Skip to content

Commit

Permalink
UPT: migrated to Swift 4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Tsang committed Oct 3, 2018
1 parent 87c608e commit 2d1a330
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Example/NumberField.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Debug;
};
Expand All @@ -535,7 +535,7 @@
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 4.2;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Example/NumberField/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
Expand Down
4 changes: 2 additions & 2 deletions Example/Pods/Pods.xcodeproj/project.pbxproj

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion NumberField.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'NumberField'
s.version = '0.4.0'
s.version = '0.4.2'
s.summary = 'Numeric field with Numpad keyboard on both iPhone and iPad'

# This description is used to generate tags and improve search results.
Expand Down
2 changes: 1 addition & 1 deletion NumberField/Classes/FakeCursor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ final class FakeCursor: UIView {


override var intrinsicContentSize: CGSize {
return CGSize(width: 2, height: UIViewNoIntrinsicMetric)
return CGSize(width: 2, height: UIView.noIntrinsicMetric)
}

override var isHidden: Bool {
Expand Down
2 changes: 1 addition & 1 deletion NumberField/Classes/NumberField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ import UIKit
}

override open var intrinsicContentSize: CGSize {
return CGSize(width: UIViewNoIntrinsicMetric, height: 30)
return CGSize(width: UIView.noIntrinsicMetric, height: 30)
}

//MARK: Cursor and Highlight
Expand Down
4 changes: 2 additions & 2 deletions NumberField/Classes/UIControlEventsExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@

import UIKit

extension UIControlEvents {
public static var editingRejected: UIControlEvents { return UIControlEvents(rawValue: 0b0001 << 24) }
extension UIControl.Event {
public static var editingRejected: UIControl.Event { return UIControl.Event(rawValue: 0b0001 << 24) }
}
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Version](https://img.shields.io/cocoapods/v/NumberField.svg?style=flat)](http://cocoapods.org/pods/NumberField)
[![License](https://img.shields.io/cocoapods/l/NumberField.svg?style=flat)](http://cocoapods.org/pods/NumberField)
[![Platform](https://img.shields.io/cocoapods/p/NumberField.svg?style=flat)](http://cocoapods.org/pods/NumberField)
[![Language](https://img.shields.io/badge/Swift-4.0-orange.svg?style=flat)](http://cocoapods.org/pods/NumberField)
[![Language](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)](http://cocoapods.org/pods/NumberField)

<img src="DEMO.gif" border=1 style="border-color:#eeeeee">

Expand All @@ -18,8 +18,16 @@ iOS 9.0 or above
NumberField is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following line to your Podfile:

Swift 4.2<br>

```ruby
pod 'NumberField', '0.4.2'
```

Swift 4.0<br>

```ruby
pod 'NumberField', '~> 0.4'
pod 'NumberField', '0.4.0'
```

## Usage
Expand Down

0 comments on commit 2d1a330

Please sign in to comment.