Skip to content

Commit ed62ccb

Browse files
authored
Merge pull request #6 from hryk224/swift3
Swift3
2 parents f0c4a4d + 98a8b65 commit ed62ccb

17 files changed

Lines changed: 299 additions & 216 deletions

Example/Example.xcodeproj/project.pbxproj

Lines changed: 42 additions & 22 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;
@@ -155,11 +163,12 @@
155163
isa = PBXProject;
156164
attributes = {
157165
LastSwiftUpdateCheck = 0730;
158-
LastUpgradeCheck = 0730;
166+
LastUpgradeCheck = 0810;
159167
ORGANIZATIONNAME = "hiroyuki yoshida";
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

@@ -270,8 +279,10 @@
270279
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
271280
CLANG_WARN_EMPTY_BODY = YES;
272281
CLANG_WARN_ENUM_CONVERSION = YES;
282+
CLANG_WARN_INFINITE_RECURSION = YES;
273283
CLANG_WARN_INT_CONVERSION = YES;
274284
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
285+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
275286
CLANG_WARN_UNREACHABLE_CODE = YES;
276287
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
277288
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -293,7 +304,7 @@
293304
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294305
GCC_WARN_UNUSED_FUNCTION = YES;
295306
GCC_WARN_UNUSED_VARIABLE = YES;
296-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
307+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297308
MTL_ENABLE_DEBUG_INFO = YES;
298309
ONLY_ACTIVE_ARCH = YES;
299310
SDKROOT = iphoneos;
@@ -315,8 +326,10 @@
315326
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
316327
CLANG_WARN_EMPTY_BODY = YES;
317328
CLANG_WARN_ENUM_CONVERSION = YES;
329+
CLANG_WARN_INFINITE_RECURSION = YES;
318330
CLANG_WARN_INT_CONVERSION = YES;
319331
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
332+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
320333
CLANG_WARN_UNREACHABLE_CODE = YES;
321334
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
322335
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
@@ -332,32 +345,39 @@
332345
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
333346
GCC_WARN_UNUSED_FUNCTION = YES;
334347
GCC_WARN_UNUSED_VARIABLE = YES;
335-
IPHONEOS_DEPLOYMENT_TARGET = 9.3;
348+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
336349
MTL_ENABLE_DEBUG_INFO = NO;
337350
SDKROOT = iphoneos;
351+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
338352
VALIDATE_PRODUCT = YES;
339353
};
340354
name = Release;
341355
};
342356
935BD6D81CE26EB600E5FDF7 /* Debug */ = {
343357
isa = XCBuildConfiguration;
344358
buildSettings = {
359+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
345360
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
346361
INFOPLIST_FILE = Example/Info.plist;
362+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
347363
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
348364
PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
349365
PRODUCT_NAME = "$(TARGET_NAME)";
366+
SWIFT_VERSION = 3.0;
350367
};
351368
name = Debug;
352369
};
353370
935BD6D91CE26EB600E5FDF7 /* Release */ = {
354371
isa = XCBuildConfiguration;
355372
buildSettings = {
373+
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
356374
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
357375
INFOPLIST_FILE = Example/Info.plist;
376+
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
358377
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
359378
PRODUCT_BUNDLE_IDENTIFIER = io.github.hryk224.Example;
360379
PRODUCT_NAME = "$(TARGET_NAME)";
380+
SWIFT_VERSION = 3.0;
361381
};
362382
name = Release;
363383
};

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/Assets.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
{
22
"images" : [
3+
{
4+
"idiom" : "iphone",
5+
"size" : "20x20",
6+
"scale" : "2x"
7+
},
8+
{
9+
"idiom" : "iphone",
10+
"size" : "20x20",
11+
"scale" : "3x"
12+
},
313
{
414
"idiom" : "iphone",
515
"size" : "29x29",

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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ 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) {
16-
let image = UIImage(named: String(dequeueIndexPath.item))
15+
func configure(_ indexPath: IndexPath) {
16+
let image = UIImage(named: String(indexPath.item))
1717
imageView.image = image
1818
setNeedsLayout()
1919
layoutIfNeeded()

0 commit comments

Comments
 (0)