diff --git a/.swift-version b/.swift-version index 5186d07..7d5c902 100644 --- a/.swift-version +++ b/.swift-version @@ -1 +1 @@ -4.0 +4.1 diff --git a/.travis.yml b/.travis.yml index 6a3d9a9..b980816 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,16 @@ -osx_image: xcode9 +osx_image: xcode9.3 language: objective-c sudo: required env: global: - PROJECT="ReusableKit.xcodeproj" - SCHEME="ReusableKit-Package" - - IOS_SDK="iphonesimulator11.0" + - IOS_SDK="iphonesimulator11.3" - MACOS_SDK="macosx10.13" - - TVOS_SDK="appletvsimulator11.0" + - TVOS_SDK="appletvsimulator11.3" - FRAMEWORK="ReusableKit" matrix: - - SDK="$IOS_SDK" DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=11.0" + - SDK="$IOS_SDK" DESTINATION="platform=iOS Simulator,name=iPhone 8,OS=11.3" install: - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" diff --git a/README.md b/README.md index 606b216..6fc43e4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ReusableKit -![Swift](https://img.shields.io/badge/Swift-3.1-orange.svg) +![Swift](https://img.shields.io/badge/Swift-4.1-orange.svg) [![CocoaPods](http://img.shields.io/cocoapods/v/ReusableKit.svg)](https://cocoapods.org/pods/ReusableKit) [![Build Status](https://travis-ci.org/devxoul/ReusableKit.svg)](https://travis-ci.org/devxoul/ReusableKit) [![Codecov](https://img.shields.io/codecov/c/github/devxoul/ReusableKit.svg)](https://codecov.io/gh/devxoul/ReusableKit) diff --git a/Sources/ReusableKit/ReusableKit.swift b/Sources/ReusableKit/ReusableKit.swift index 3135980..28120ca 100644 --- a/Sources/ReusableKit/ReusableKit.swift +++ b/Sources/ReusableKit/ReusableKit.swift @@ -19,7 +19,7 @@ public struct ReusableCell { /// - parameter nib: A `UINib` instance. Use this when registering from xib. public init(identifier: String? = nil, nib: UINib? = nil) { self.identifier = nib?.instantiate(withOwner: nil, options: nil).lazy - .flatMap { ($0 as? CellType)?.reuseIdentifier } + .compactMap { ($0 as? CellType)?.reuseIdentifier } .first ?? identifier ?? UUID().uuidString self.nib = nib }