Skip to content

Commit a5535d0

Browse files
committed
Support swift3
1 parent f0c4a4d commit a5535d0

16 files changed

Lines changed: 179 additions & 175 deletions

Example/Example.xcodeproj/project.pbxproj

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,21 @@
1818
935BD6E51CE26F0B00E5FDF7 /* Pattern1ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935BD6DE1CE26F0B00E5FDF7 /* Pattern1ViewController.swift */; };
1919
935BD6E61CE26F0B00E5FDF7 /* Pattern2.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 935BD6DF1CE26F0B00E5FDF7 /* Pattern2.storyboard */; };
2020
935BD6E71CE26F0B00E5FDF7 /* Pattern2ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 935BD6E01CE26F0B00E5FDF7 /* Pattern2ViewController.swift */; };
21-
935BD71D1CE26FBF00E5FDF7 /* InfiniteCollectionView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 935BD71C1CE26FB600E5FDF7 /* InfiniteCollectionView.framework */; };
22-
935BD71E1CE26FBF00E5FDF7 /* InfiniteCollectionView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 935BD71C1CE26FB600E5FDF7 /* InfiniteCollectionView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
21+
EDA05AD81D92901C00F7C2C5 /* InfiniteCollectionView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = EDA05AD71D92901900F7C2C5 /* InfiniteCollectionView.framework */; };
22+
EDA05AD91D92901C00F7C2C5 /* InfiniteCollectionView.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = EDA05AD71D92901900F7C2C5 /* InfiniteCollectionView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
2323
/* End PBXBuildFile section */
2424

2525
/* Begin PBXContainerItemProxy section */
26-
935BD71B1CE26FB600E5FDF7 /* PBXContainerItemProxy */ = {
26+
EDA05AD61D92901900F7C2C5 /* PBXContainerItemProxy */ = {
2727
isa = PBXContainerItemProxy;
28-
containerPortal = 935BD7171CE26FB600E5FDF7 /* InfiniteCollectionView.xcodeproj */;
28+
containerPortal = EDA05AD21D92901900F7C2C5 /* InfiniteCollectionView.xcodeproj */;
2929
proxyType = 2;
3030
remoteGlobalIDString = 935BD70D1CE26F8E00E5FDF7;
3131
remoteInfo = InfiniteCollectionView;
3232
};
33-
935BD71F1CE26FBF00E5FDF7 /* PBXContainerItemProxy */ = {
33+
EDA05ADA1D92901C00F7C2C5 /* PBXContainerItemProxy */ = {
3434
isa = PBXContainerItemProxy;
35-
containerPortal = 935BD7171CE26FB600E5FDF7 /* InfiniteCollectionView.xcodeproj */;
35+
containerPortal = EDA05AD21D92901900F7C2C5 /* InfiniteCollectionView.xcodeproj */;
3636
proxyType = 1;
3737
remoteGlobalIDString = 935BD70C1CE26F8E00E5FDF7;
3838
remoteInfo = InfiniteCollectionView;
@@ -46,7 +46,7 @@
4646
dstPath = "";
4747
dstSubfolderSpec = 10;
4848
files = (
49-
935BD71E1CE26FBF00E5FDF7 /* InfiniteCollectionView.framework in Embed Frameworks */,
49+
EDA05AD91D92901C00F7C2C5 /* InfiniteCollectionView.framework in Embed Frameworks */,
5050
);
5151
name = "Embed Frameworks";
5252
runOnlyForDeploymentPostprocessing = 0;
@@ -67,15 +67,15 @@
6767
935BD6DE1CE26F0B00E5FDF7 /* Pattern1ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pattern1ViewController.swift; sourceTree = "<group>"; };
6868
935BD6DF1CE26F0B00E5FDF7 /* Pattern2.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Pattern2.storyboard; sourceTree = "<group>"; };
6969
935BD6E01CE26F0B00E5FDF7 /* Pattern2ViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Pattern2ViewController.swift; sourceTree = "<group>"; };
70-
935BD7171CE26FB600E5FDF7 /* InfiniteCollectionView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = InfiniteCollectionView.xcodeproj; path = ../InfiniteCollectionView.xcodeproj; sourceTree = "<group>"; };
70+
EDA05AD21D92901900F7C2C5 /* InfiniteCollectionView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = InfiniteCollectionView.xcodeproj; path = ../InfiniteCollectionView.xcodeproj; sourceTree = "<group>"; };
7171
/* End PBXFileReference section */
7272

7373
/* Begin PBXFrameworksBuildPhase section */
7474
935BD6C21CE26EB600E5FDF7 /* Frameworks */ = {
7575
isa = PBXFrameworksBuildPhase;
7676
buildActionMask = 2147483647;
7777
files = (
78-
935BD71D1CE26FBF00E5FDF7 /* InfiniteCollectionView.framework in Frameworks */,
78+
EDA05AD81D92901C00F7C2C5 /* InfiniteCollectionView.framework in Frameworks */,
7979
);
8080
runOnlyForDeploymentPostprocessing = 0;
8181
};
@@ -85,9 +85,9 @@
8585
935BD6BC1CE26EB600E5FDF7 = {
8686
isa = PBXGroup;
8787
children = (
88-
935BD7171CE26FB600E5FDF7 /* InfiniteCollectionView.xcodeproj */,
8988
935BD6C71CE26EB600E5FDF7 /* Example */,
9089
935BD6C61CE26EB600E5FDF7 /* Products */,
90+
EDA05AD11D92901900F7C2C5 /* Frameworks */,
9191
);
9292
sourceTree = "<group>";
9393
};
@@ -118,10 +118,18 @@
118118
path = Example;
119119
sourceTree = "<group>";
120120
};
121-
935BD7181CE26FB600E5FDF7 /* Products */ = {
121+
EDA05AD11D92901900F7C2C5 /* Frameworks */ = {
122122
isa = PBXGroup;
123123
children = (
124-
935BD71C1CE26FB600E5FDF7 /* InfiniteCollectionView.framework */,
124+
EDA05AD21D92901900F7C2C5 /* InfiniteCollectionView.xcodeproj */,
125+
);
126+
name = Frameworks;
127+
sourceTree = "<group>";
128+
};
129+
EDA05AD31D92901900F7C2C5 /* Products */ = {
130+
isa = PBXGroup;
131+
children = (
132+
EDA05AD71D92901900F7C2C5 /* InfiniteCollectionView.framework */,
125133
);
126134
name = Products;
127135
sourceTree = "<group>";
@@ -141,7 +149,7 @@
141149
buildRules = (
142150
);
143151
dependencies = (
144-
935BD7201CE26FBF00E5FDF7 /* PBXTargetDependency */,
152+
EDA05ADB1D92901C00F7C2C5 /* PBXTargetDependency */,
145153
);
146154
name = Example;
147155
productName = Example;
@@ -160,6 +168,7 @@
160168
TargetAttributes = {
161169
935BD6C41CE26EB600E5FDF7 = {
162170
CreatedOnToolsVersion = 7.3.1;
171+
LastSwiftMigration = 0800;
163172
};
164173
};
165174
};
@@ -176,8 +185,8 @@
176185
projectDirPath = "";
177186
projectReferences = (
178187
{
179-
ProductGroup = 935BD7181CE26FB600E5FDF7 /* Products */;
180-
ProjectRef = 935BD7171CE26FB600E5FDF7 /* InfiniteCollectionView.xcodeproj */;
188+
ProductGroup = EDA05AD31D92901900F7C2C5 /* Products */;
189+
ProjectRef = EDA05AD21D92901900F7C2C5 /* InfiniteCollectionView.xcodeproj */;
181190
},
182191
);
183192
projectRoot = "";
@@ -188,11 +197,11 @@
188197
/* End PBXProject section */
189198

190199
/* Begin PBXReferenceProxy section */
191-
935BD71C1CE26FB600E5FDF7 /* InfiniteCollectionView.framework */ = {
200+
EDA05AD71D92901900F7C2C5 /* InfiniteCollectionView.framework */ = {
192201
isa = PBXReferenceProxy;
193202
fileType = wrapper.framework;
194203
path = InfiniteCollectionView.framework;
195-
remoteRef = 935BD71B1CE26FB600E5FDF7 /* PBXContainerItemProxy */;
204+
remoteRef = EDA05AD61D92901900F7C2C5 /* PBXContainerItemProxy */;
196205
sourceTree = BUILT_PRODUCTS_DIR;
197206
};
198207
/* End PBXReferenceProxy section */
@@ -229,10 +238,10 @@
229238
/* End PBXSourcesBuildPhase section */
230239

231240
/* Begin PBXTargetDependency section */
232-
935BD7201CE26FBF00E5FDF7 /* PBXTargetDependency */ = {
241+
EDA05ADB1D92901C00F7C2C5 /* PBXTargetDependency */ = {
233242
isa = PBXTargetDependency;
234243
name = InfiniteCollectionView;
235-
targetProxy = 935BD71F1CE26FBF00E5FDF7 /* PBXContainerItemProxy */;
244+
targetProxy = EDA05ADA1D92901C00F7C2C5 /* PBXContainerItemProxy */;
236245
};
237246
/* End PBXTargetDependency section */
238247

@@ -342,22 +351,28 @@
342351
935BD6D81CE26EB600E5FDF7 /* Debug */ = {
343352
isa = XCBuildConfiguration;
344353
buildSettings = {
354+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
345355
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
346356
INFOPLIST_FILE = Example/Info.plist;
357+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
347358
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
348359
PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
349360
PRODUCT_NAME = "$(TARGET_NAME)";
361+
SWIFT_VERSION = 3.0;
350362
};
351363
name = Debug;
352364
};
353365
935BD6D91CE26EB600E5FDF7 /* Release */ = {
354366
isa = XCBuildConfiguration;
355367
buildSettings = {
368+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
356369
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357370
INFOPLIST_FILE = Example/Info.plist;
371+
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
358372
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
359373
PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
360374
PRODUCT_NAME = "$(TARGET_NAME)";
375+
SWIFT_VERSION = 3.0;
361376
};
362377
name = Release;
363378
};

Example/Example/AppDelegate.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
return true
2020
}
2121

22-
func applicationWillResignActive(application: UIApplication) {
22+
func applicationWillResignActive(_ application: UIApplication) {
2323
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
2424
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
2525
}
2626

27-
func applicationDidEnterBackground(application: UIApplication) {
27+
func applicationDidEnterBackground(_ application: UIApplication) {
2828
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
2929
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
3030
}
3131

32-
func applicationWillEnterForeground(application: UIApplication) {
32+
func applicationWillEnterForeground(_ application: UIApplication) {
3333
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
3434
}
3535

36-
func applicationDidBecomeActive(application: UIApplication) {
36+
func applicationDidBecomeActive(_ application: UIApplication) {
3737
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
3838
}
3939

40-
func applicationWillTerminate(application: UIApplication) {
40+
func applicationWillTerminate(_ application: UIApplication) {
4141
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
4242
}
4343

Example/Example/Base.lproj/LaunchScreen.storyboard

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8150" systemVersion="15A204g" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8122"/>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
57
</dependencies>
68
<scenes>
79
<!--View Controller-->
@@ -13,10 +15,9 @@
1315
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
1416
</layoutGuides>
1517
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
16-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
18+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
1719
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
18-
<animations/>
19-
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
20+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2021
</view>
2122
</viewController>
2223
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>

Example/Example/Base.lproj/Main.storyboard

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="ptf-1R-ZgN">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="ptf-1R-ZgN">
33
<dependencies>
44
<deployment identifier="iOS"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
67
</dependencies>
78
<scenes>
89
<!--Navigation Controller-->
@@ -30,15 +31,14 @@
3031
<viewControllerLayoutGuide type="bottom" id="WMJ-rH-CQa"/>
3132
</layoutGuides>
3233
<view key="view" contentMode="scaleToFill" id="HUl-2W-LaH">
33-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
34+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
3435
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
3536
<subviews>
3637
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="I2m-0B-Ns8">
37-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
38-
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
38+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
3939
</tableView>
4040
</subviews>
41-
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
41+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4242
<constraints>
4343
<constraint firstAttribute="trailing" secondItem="I2m-0B-Ns8" secondAttribute="trailing" id="0tu-qe-S7J"/>
4444
<constraint firstItem="I2m-0B-Ns8" firstAttribute="leading" secondItem="HUl-2W-LaH" secondAttribute="leading" id="g0I-Ut-iu3"/>

Example/Example/ImageCollectionViewCell.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ final class ImageCollectionViewCell: UICollectionViewCell {
1212
@IBOutlet weak var imageView: UIImageView!
1313
static let identifier = "ImageCollectionViewCell"
1414
static let nib = UINib(nibName: "ImageCollectionViewCell", bundle: nil)
15-
func configure(dequeueIndexPath dequeueIndexPath: NSIndexPath) {
15+
func configure(dequeueIndexPath: IndexPath) {
1616
let image = UIImage(named: String(dequeueIndexPath.item))
1717
imageView.image = image
1818
setNeedsLayout()
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9531" systemVersion="15C50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11201" systemVersion="15G1004" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
33
<dependencies>
4-
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9529"/>
4+
<deployment identifier="iOS"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11161"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
57
</dependencies>
68
<objects>
79
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -11,12 +13,10 @@
1113
<autoresizingMask key="autoresizingMask"/>
1214
<view key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center">
1315
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
16+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
1417
<subviews>
15-
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6aC-HR-aM0">
16-
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17-
</imageView>
18+
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="6aC-HR-aM0"/>
1819
</subviews>
19-
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
2020
</view>
2121
<constraints>
2222
<constraint firstItem="6aC-HR-aM0" firstAttribute="leading" secondItem="gTV-IL-0wX" secondAttribute="leading" id="hnJ-jX-Q7o"/>
@@ -27,7 +27,7 @@
2727
<connections>
2828
<outlet property="imageView" destination="6aC-HR-aM0" id="4uF-jM-h1C"/>
2929
</connections>
30-
<point key="canvasLocation" x="839" y="363"/>
30+
<point key="canvasLocation" x="27" y="27"/>
3131
</collectionViewCell>
3232
</objects>
3333
</document>

0 commit comments

Comments
 (0)