Skip to content

Commit ff672b7

Browse files
authored
Merge pull request #180 from layoutBox/update_pods_swift_4_2
Update Sample app to Swift 4.2
2 parents e33498b + 26d3f2d commit ff672b7

File tree

15 files changed

+107
-321
lines changed

15 files changed

+107
-321
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ data/
88

99
Pods/
1010

11-
docs/1.2
12-
fastlane/README.md
13-
fastlane/report.xml
14-
fastlane/test_output
15-
1611
TestProjects/cocoapods/ios/PinLayout-iOS.xcworkspace/
1712
TestProjects/cocoapods/macos/PinLayout-macOS.xcworkspace/
1813
TestProjects/cocoapods/tvos/PinLayout-tvOS.xcworkspace/

.swift-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4.2

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: objective-c
2-
osx_image: xcode9.4
2+
osx_image: xcode10
33

44
cache:
55
- bundler

Example/PinLayoutSample.xcodeproj/project.pbxproj

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
remoteInfo = "PinLayoutTests-tvOS";
105105
};
106106
/* End PBXContainerItemProxy section */
107+
107108
/* Begin PBXFileReference section */
108109
241637701F8E4BC200EE703A /* IntroObjectiveCViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntroObjectiveCViewController.h; sourceTree = "<group>"; };
109110
241637711F8E4BC200EE703A /* IntroObjectiveCViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = IntroObjectiveCViewController.m; sourceTree = "<group>"; };
@@ -509,6 +510,7 @@
509510
TargetAttributes = {
510511
249EFE3E1E64FAFE00165E39 = {
511512
CreatedOnToolsVersion = 8.2.1;
513+
LastSwiftMigration = 1000;
512514
ProvisioningStyle = Automatic;
513515
};
514516
};
@@ -617,7 +619,7 @@
617619
inputPaths = (
618620
"${SRCROOT}/../Pods/Target Support Files/Pods-PinLayoutSample/Pods-PinLayoutSample-frameworks.sh",
619621
"${BUILT_PRODUCTS_DIR}/PinLayout/PinLayout.framework",
620-
"${PODS_ROOT}/Reveal-SDK/RevealServer-17/iOS/RevealServer.framework",
622+
"${PODS_ROOT}/Reveal-SDK/RevealServer-18/iOS/RevealServer.framework",
621623
);
622624
name = "[CP] Embed Pods Frameworks";
623625
outputPaths = (
@@ -843,7 +845,7 @@
843845
PRODUCT_NAME = "$(TARGET_NAME)";
844846
SWIFT_OBJC_BRIDGING_HEADER = "PinLayoutSample/UI/Examples/PinLayoutSample-Bridging-Header.h";
845847
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
846-
SWIFT_VERSION = 4.0;
848+
SWIFT_VERSION = 4.2;
847849
};
848850
name = Debug;
849851
};
@@ -860,7 +862,7 @@
860862
PRODUCT_BUNDLE_IDENTIFIER = com.layoutbox.PinLayoutSample;
861863
PRODUCT_NAME = "$(TARGET_NAME)";
862864
SWIFT_OBJC_BRIDGING_HEADER = "PinLayoutSample/UI/Examples/PinLayoutSample-Bridging-Header.h";
863-
SWIFT_VERSION = 4.0;
865+
SWIFT_VERSION = 4.2;
864866
};
865867
name = Release;
866868
};

Example/PinLayoutSample/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import PinLayout
2424
class AppDelegate: UIResponder, UIApplicationDelegate {
2525
var window: UIWindow?
2626

27-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
27+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2828

2929
window = UIWindow(frame: UIScreen.main.bounds)
3030
window!.backgroundColor = UIColor.white

Example/PinLayoutSample/UI/Common/BaseFormView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ class BaseFormView: UIView {
3232
formScrollView.addGestureRecognizer(UITapGestureRecognizer(target: self, action: #selector(didTapScrollView)))
3333
addSubview(formScrollView)
3434

35-
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: .UIKeyboardWillShow, object: nil)
36-
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: .UIKeyboardWillHide, object: nil)
35+
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillShow), name: UIResponder.keyboardWillShowNotification, object: nil)
36+
NotificationCenter.default.addObserver(self, selector: #selector(keyboardWillHide), name: UIResponder.keyboardWillHideNotification, object: nil)
3737
}
3838

3939
required init(coder aDecoder: NSCoder) {
@@ -52,7 +52,7 @@ class BaseFormView: UIView {
5252

5353
@objc
5454
internal func keyboardWillShow(notification: Notification) {
55-
guard let sizeValue = notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue else { return }
55+
guard let sizeValue = notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue else { return }
5656
setFormScrollView(bottomInset: sizeValue.cgRectValue.height)
5757
}
5858

Example/PinLayoutSample/UI/Examples/TableViewExample/Cells/MethodCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class MethodCell: UITableViewCell {
2828
private let descriptionLabel = UILabel()
2929
private let padding: CGFloat = 10
3030

31-
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
31+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
3232
super.init(style: style, reuseIdentifier: reuseIdentifier)
3333

3434
selectionStyle = .none

Example/PinLayoutSample/UI/Examples/TableViewExample/TableViewExampleView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,6 @@ extension TableViewExampleView: UITableViewDataSource, UITableViewDelegate {
8181
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
8282
// The UITableView will call the cell's sizeThatFit() method to compute the height.
8383
// WANRING: You must also set the UITableView.estimatedRowHeight for this to work.
84-
return UITableViewAutomaticDimension
84+
return UITableView.automaticDimension
8585
}
8686
}

Example/PinLayoutSample/UI/Examples/TableViewReadableContent/Cells/MethodReadableInsetsCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class MethodReadableInsetsCell: UITableViewCell {
88
private let descriptionLabel = UILabel()
99
private let margin: CGFloat = 10
1010

11-
override init(style: UITableViewCellStyle, reuseIdentifier: String?) {
11+
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
1212
super.init(style: style, reuseIdentifier: reuseIdentifier)
1313

1414
selectionStyle = .none

Gemfile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
source 'https://rubygems.org'
2-
gem 'synx'
3-
gem 'cocoapods', '~> 1.5.3'
2+
gem 'cocoapods', '~> 1.6.0.beta.2'
43
gem 'jazzy', '0.9'
5-
gem 'fastlane'
64
gem 'xcpretty-travis-formatter'

0 commit comments

Comments
 (0)