Skip to content

Commit d5300f3

Browse files
authored
Merge pull request BenEmdon#42 from vkcldhkd/master
Update to Swift 5.0
2 parents e206e3d + d87ed0b commit d5300f3

File tree

12 files changed

+215
-197
lines changed

12 files changed

+215
-197
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: swift
2-
osx_image: xcode9
2+
osx_image: xcode10.2
33
xcode_project: Example/CenteredCollectionView.xcworkspace
44
xcode_schema: CenteredCollectionView_Tests
55
notifications:

CenteredCollectionView.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Pod::Spec.new do |s|
6464

6565
# s.platform = :ios
6666
s.ios.deployment_target = '9.0'
67-
s.swift_version = '4.2'
67+
s.swift_version = '5.0'
6868

6969
# When using multiple platforms
7070
# s.ios.deployment_target = '5.0'

CenteredCollectionView/Classes/CenteredCollectionViewFlowLayout.swift

Lines changed: 185 additions & 170 deletions
Large diffs are not rendered by default.

Example/CenteredCollectionView.xcodeproj/project.pbxproj

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,24 +257,24 @@
257257
isa = PBXProject;
258258
attributes = {
259259
LastSwiftUpdateCheck = 0720;
260-
LastUpgradeCheck = 1010;
260+
LastUpgradeCheck = 1020;
261261
ORGANIZATIONNAME = CocoaPods;
262262
TargetAttributes = {
263263
607FACCF1AFB9204008FA782 = {
264264
CreatedOnToolsVersion = 6.3.1;
265-
LastSwiftMigration = 0920;
265+
LastSwiftMigration = 1020;
266266
ProvisioningStyle = Automatic;
267267
};
268268
607FACE41AFB9204008FA782 = {
269269
CreatedOnToolsVersion = 6.3.1;
270-
LastSwiftMigration = 0920;
270+
LastSwiftMigration = 1020;
271271
TestTargetID = 607FACCF1AFB9204008FA782;
272272
};
273273
};
274274
};
275275
buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "CenteredCollectionView" */;
276276
compatibilityVersion = "Xcode 3.2";
277-
developmentRegion = English;
277+
developmentRegion = en;
278278
hasScannedForEncodings = 0;
279279
knownRegions = (
280280
en,
@@ -482,6 +482,7 @@
482482
buildSettings = {
483483
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
484484
ALWAYS_SEARCH_USER_PATHS = NO;
485+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
485486
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
486487
CLANG_CXX_LIBRARY = "libc++";
487488
CLANG_ENABLE_MODULES = YES;
@@ -538,6 +539,7 @@
538539
buildSettings = {
539540
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
540541
ALWAYS_SEARCH_USER_PATHS = NO;
542+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
541543
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
542544
CLANG_CXX_LIBRARY = "libc++";
543545
CLANG_ENABLE_MODULES = YES;
@@ -599,8 +601,7 @@
599601
PRODUCT_NAME = "$(TARGET_NAME)";
600602
PROVISIONING_PROFILE_SPECIFIER = "";
601603
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
602-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
603-
SWIFT_VERSION = 4.0;
604+
SWIFT_VERSION = 5.0;
604605
};
605606
name = Debug;
606607
};
@@ -620,8 +621,7 @@
620621
PRODUCT_BUNDLE_IDENTIFIER = "io.github.benemdon.CenteredCollectionView-Example";
621622
PRODUCT_NAME = "$(TARGET_NAME)";
622623
PROVISIONING_PROFILE_SPECIFIER = "";
623-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
624-
SWIFT_VERSION = 4.0;
624+
SWIFT_VERSION = 5.0;
625625
};
626626
name = Release;
627627
};
@@ -640,8 +640,7 @@
640640
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
641641
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
642642
PRODUCT_NAME = "$(TARGET_NAME)";
643-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
644-
SWIFT_VERSION = 4.0;
643+
SWIFT_VERSION = 5.0;
645644
};
646645
name = Debug;
647646
};
@@ -656,8 +655,7 @@
656655
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
657656
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
658657
PRODUCT_NAME = "$(TARGET_NAME)";
659-
SWIFT_SWIFT3_OBJC_INFERENCE = On;
660-
SWIFT_VERSION = 4.0;
658+
SWIFT_VERSION = 5.0;
661659
};
662660
name = Release;
663661
};

Example/CenteredCollectionView.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView-Example.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1010"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Example/CenteredCollectionView/AppDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1515

1616
func application(
1717
_ application: UIApplication,
18-
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
18+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
1919
) -> Bool {
2020

2121
return true

Example/CenteredCollectionView/ControlCenterView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import UIKit
1010

1111
protocol ControlCenterViewDelegate: class {
12-
func stateChanged(scrollDirection: UICollectionViewScrollDirection)
12+
func stateChanged(scrollDirection: UICollectionView.ScrollDirection)
1313
func stateChanged(scrollToEdgeEnabled: Bool)
1414
}
1515

@@ -70,7 +70,7 @@ class ControlCenterView: UIView {
7070
// MARK: - Actions
7171

7272
@objc func controlStateDidChange(sender: UISegmentedControl) {
73-
guard let scrollDirection = UICollectionViewScrollDirection(rawValue: sender.selectedSegmentIndex) else { return }
73+
guard let scrollDirection = UICollectionView.ScrollDirection(rawValue: sender.selectedSegmentIndex) else { return }
7474
delegate?.stateChanged(scrollDirection: scrollDirection)
7575
}
7676

Example/CenteredCollectionView/ProgrammaticViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class ProgrammaticViewController: UIViewController {
7272
}
7373

7474
extension ProgrammaticViewController: ControlCenterViewDelegate {
75-
func stateChanged(scrollDirection: UICollectionViewScrollDirection) {
75+
func stateChanged(scrollDirection: UICollectionView.ScrollDirection) {
7676
centeredCollectionViewFlowLayout.scrollDirection = scrollDirection
7777
}
7878

Example/CenteredCollectionView/StoryboardViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class StoryboardViewController: UIViewController {
2424
centeredCollectionViewFlowLayout = (collectionView.collectionViewLayout as! CenteredCollectionViewFlowLayout)
2525

2626
// Modify the collectionView's decelerationRate (REQURED)
27-
collectionView.decelerationRate = UIScrollViewDecelerationRateFast
27+
collectionView.decelerationRate = UIScrollView.DecelerationRate.fast
2828

2929
// Make the example pretty ✨
3030
view.applyGradient()

Example/Pods/Pods.xcodeproj/project.pbxproj

Lines changed: 10 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/CenteredCollectionView.xcscheme

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
[![Build Status](https://travis-ci.org/BenEmdon/CenteredCollectionView.svg?branch=master)](https://travis-ci.org/BenEmdon/CenteredCollectionView)
33
[![Version](https://img.shields.io/cocoapods/v/CenteredCollectionView.svg?style=flat)](http://cocoapods.org/pods/CenteredCollectionView)
44
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
5-
[![Swift 4.2](https://img.shields.io/badge/Swift-4.2-orange.svg?style=flat)](https://swift.org)
5+
[![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg?style=flat)](https://swift.org)
66
[![Platform](https://img.shields.io/badge/platforms-iOS%20%7C%20tvOS-orange.svg)](http://cocoapods.org/pods/CenteredCollectionView)
77
[![Backers on Open Collective](https://opencollective.com/CenteredCollectionView/backers/badge.svg?style=flat)](#backers)
88
[![Sponsors on Open Collective](https://opencollective.com/CenteredCollectionView/sponsors/badge.svg?style=flat)](#sponsors)

0 commit comments

Comments
 (0)