diff --git a/.swift-version b/.swift-version deleted file mode 100644 index 5186d07..0000000 --- a/.swift-version +++ /dev/null @@ -1 +0,0 @@ -4.0 diff --git a/.travis.yml b/.travis.yml index 84b64d7..2f29c72 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -osx_image: xcode9 +osx_image: xcode10 language: swift # cache: cocoapods # podfile: Example/Podfile @@ -8,10 +8,11 @@ env: - LC_CTYPE=en_US.UTF-8 - LANG=en_US.UTF-8 matrix: - - DESTINATION="OS=11.0,name=iPhone 8" SDK="iphonesimulator11.0" POD_LINT="YES" SWIFT_LINT="YES" - - DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SDK="iphonesimulator11.0" POD_LINT="NO" SWIFT_LINT="NO" - - DESTINATION="OS=9.3,name=iPhone 6" SDK="iphonesimulator11.0" POD_LINT="NO" SWIFT_LINT="NO" - - DESTINATION="OS=8.4,name=iPhone 4S" SDK="iphonesimulator11.0" POD_LINT="NO" SWIFT_LINT="NO" + - DESTINATION="OS=12.0,name=iPhone XS" SDK="iphonesimulator12.0" POD_LINT="YES" SWIFT_LINT="YES" + - DESTINATION="OS=11.4,name=iPhone 8" SDK="iphonesimulator12.0" POD_LINT="YES" SWIFT_LINT="YES" + - DESTINATION="OS=10.3.1,name=iPhone 7 Plus" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" + - DESTINATION="OS=9.3,name=iPhone 6" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" + # - DESTINATION="OS=8.4,name=iPhone 5S" SDK="iphonesimulator12.0" POD_LINT="NO" SWIFT_LINT="NO" before_install: - brew install swiftlint diff --git a/McPicker.podspec b/McPicker.podspec index b77fdcf..f0dca02 100644 --- a/McPicker.podspec +++ b/McPicker.podspec @@ -1,7 +1,8 @@ Pod::Spec.new do |s| s.name = 'McPicker' - s.version = '1.0.0' + s.version = '2.0.0' s.summary = 'McPicker is a customizable, closure driven UIPickerView drop-in solution with animations that is rotation ready.' + s.swift_version = '4.2' s.description = <<-DESC McPicker is a UIPickerView drop-in solution with animations that is rotation ready. The more string arrays you pass, the more picker components you'll get. You can set custom label or use the defaults. McPicker can be presented as a Popover on iPhone or iPad using showAsPopover, as an inputView using McTextField or use the default slide up and down style show. diff --git a/McPicker/Classes/McPicker.swift b/McPicker/Classes/McPicker.swift index 4731a46..826b193 100644 --- a/McPicker/Classes/McPicker.swift +++ b/McPicker/Classes/McPicker.swift @@ -270,9 +270,9 @@ open class McPicker: UIView { super.willMove(toWindow: newWindow) if newWindow != nil { - NotificationCenter.default.addObserver(self, selector: #selector(McPicker.sizeViews), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil) + NotificationCenter.default.addObserver(self, selector: #selector(McPicker.sizeViews), name: UIDevice.orientationDidChangeNotification, object: nil) } else { - NotificationCenter.default.removeObserver(self, name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil) + NotificationCenter.default.removeObserver(self, name: UIDevice.orientationDidChangeNotification, object: nil) } } diff --git a/McPicker/Classes/McPickerBarButtonItem.swift b/McPicker/Classes/McPickerBarButtonItem.swift index 6d8d34d..730b81d 100644 --- a/McPicker/Classes/McPickerBarButtonItem.swift +++ b/McPicker/Classes/McPickerBarButtonItem.swift @@ -33,7 +33,7 @@ open class McPickerBarButtonItem: UIBarButtonItem { - returns: McPickerBarButtonItem */ - public class func done(mcPicker: McPicker, title: String? = nil, barButtonSystemItem: UIBarButtonSystemItem = .done) -> McPickerBarButtonItem { + public class func done(mcPicker: McPicker, title: String? = nil, barButtonSystemItem: UIBarButtonItem.SystemItem = .done) -> McPickerBarButtonItem { if let buttonTitle = title { return self.init(title: buttonTitle, style: .plain, target: mcPicker, action: #selector(McPicker.done)) @@ -51,7 +51,7 @@ open class McPickerBarButtonItem: UIBarButtonItem { - returns: McPickerBarButtonItem */ - public class func cancel(mcPicker: McPicker, title: String? = nil, barButtonSystemItem: UIBarButtonSystemItem = .cancel) -> McPickerBarButtonItem { + public class func cancel(mcPicker: McPicker, title: String? = nil, barButtonSystemItem: UIBarButtonItem.SystemItem = .cancel) -> McPickerBarButtonItem { if let buttonTitle = title { return self.init(title: buttonTitle, style: .plain, target: mcPicker, action: #selector(McPicker.cancel)) diff --git a/README.md b/README.md index 26498c5..f37b385 100644 --- a/README.md +++ b/README.md @@ -135,6 +135,14 @@ it, simply add the following line to your Podfile: pod "McPicker" ``` +### Swift 4.2 Support + +For Swift 4.2 support, please use version `2.0.0`. + +```ruby +pod 'McPicker', '~> 2.0.0' +``` + ## Author Kevin McGill, kevin@mcgilldevtech.com