Skip to content

Commit f213b79

Browse files
committed
Updated all code in chapter-tables to Swift 2.0 (Xcode 7)
1 parent 44b8748 commit f213b79

File tree

54 files changed

+194
-76
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+194
-76
lines changed

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views.xcodeproj/project.pbxproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,8 @@
159159
9DF43D1A19643B1B005D9BA1 /* Project object */ = {
160160
isa = PBXProject;
161161
attributes = {
162-
LastUpgradeCheck = 0600;
162+
LastSwiftUpdateCheck = 0700;
163+
LastUpgradeCheck = 0700;
163164
ORGANIZATIONNAME = "Pixolity Ltd.";
164165
TargetAttributes = {
165166
9DF43D2119643B1B005D9BA1 = {
@@ -271,6 +272,7 @@
271272
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
272273
COPY_PHASE_STRIP = NO;
273274
ENABLE_STRICT_OBJC_MSGSEND = YES;
275+
ENABLE_TESTABILITY = YES;
274276
GCC_C_LANGUAGE_STANDARD = gnu99;
275277
GCC_DYNAMIC_NO_PIC = NO;
276278
GCC_OPTIMIZATION_LEVEL = 0;
@@ -337,6 +339,7 @@
337339
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
338340
INFOPLIST_FILE = "Adding Custom Interactions to Collection Views/Info.plist";
339341
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
342+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
340343
PRODUCT_NAME = "$(TARGET_NAME)";
341344
};
342345
name = Debug;
@@ -348,6 +351,7 @@
348351
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
349352
INFOPLIST_FILE = "Adding Custom Interactions to Collection Views/Info.plist";
350353
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
354+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
351355
PRODUCT_NAME = "$(TARGET_NAME)";
352356
};
353357
name = Release;
@@ -367,6 +371,7 @@
367371
INFOPLIST_FILE = "Adding Custom Interactions to Collection ViewsTests/Info.plist";
368372
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
369373
METAL_ENABLE_DEBUG_INFO = YES;
374+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
370375
PRODUCT_NAME = "$(TARGET_NAME)";
371376
TEST_HOST = "$(BUNDLE_LOADER)";
372377
};
@@ -383,6 +388,7 @@
383388
INFOPLIST_FILE = "Adding Custom Interactions to Collection ViewsTests/Info.plist";
384389
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
385390
METAL_ENABLE_DEBUG_INFO = NO;
391+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
386392
PRODUCT_NAME = "$(TARGET_NAME)";
387393
TEST_HOST = "$(BUNDLE_LOADER)";
388394
};
@@ -407,6 +413,7 @@
407413
9DF43D4019643B1B005D9BA1 /* Release */,
408414
);
409415
defaultConfigurationIsVisible = 0;
416+
defaultConfigurationName = Release;
410417
};
411418
9DF43D4119643B1B005D9BA1 /* Build configuration list for PBXNativeTarget "Adding Custom Interactions to Collection ViewsTests" */ = {
412419
isa = XCConfigurationList;
@@ -415,6 +422,7 @@
415422
9DF43D4319643B1B005D9BA1 /* Release */,
416423
);
417424
defaultConfigurationIsVisible = 0;
425+
defaultConfigurationName = Release;
418426
};
419427
/* End XCConfigurationList section */
420428
};

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/Adding Custom Interactions to Collection Views.xcscheme

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0600"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -48,6 +48,8 @@
4848
ReferencedContainer = "container:Adding Custom Interactions to Collection Views.xcodeproj">
4949
</BuildableReference>
5050
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
5153
</TestAction>
5254
<LaunchAction
5355
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -57,8 +59,10 @@
5759
buildConfiguration = "Debug"
5860
ignoresPersistentStateOnLaunch = "NO"
5961
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
6063
allowLocationSimulation = "YES">
61-
<BuildableProductRunnable>
64+
<BuildableProductRunnable
65+
runnableDebuggingMode = "0">
6266
<BuildableReference
6367
BuildableIdentifier = "primary"
6468
BlueprintIdentifier = "9DF43D2119643B1B005D9BA1"
@@ -76,7 +80,8 @@
7680
useCustomWorkingDirectory = "NO"
7781
buildConfiguration = "Release"
7882
debugDocumentVersioning = "YES">
79-
<BuildableProductRunnable>
83+
<BuildableProductRunnable
84+
runnableDebuggingMode = "0">
8085
<BuildableReference
8186
BuildableIdentifier = "primary"
8287
BlueprintIdentifier = "9DF43D2119643B1B005D9BA1"

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>${EXECUTABLE_NAME}</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.pixolity.ios.cookbook.app</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection Views/ViewController.swift

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ class ViewController: UICollectionViewController {
4141
let pinch = UIPinchGestureRecognizer(target: self,
4242
action: "handlePinches:")
4343

44-
for recognizer in collectionView!.gestureRecognizers as!
45-
[UIGestureRecognizer]{
46-
if recognizer is UIPinchGestureRecognizer{
47-
recognizer.requireGestureRecognizerToFail(pinch)
48-
}
44+
if let recognizers = collectionView?.gestureRecognizers{
45+
for recognizer in recognizers{
46+
if recognizer is UIPinchGestureRecognizer{
47+
recognizer.requireGestureRecognizerToFail(pinch)
48+
}
49+
}
4950
}
5051

5152
collectionView!.addGestureRecognizer(pinch)

chapter-tables/Adding Custom Interactions to Collection Views/Adding Custom Interactions to Collection ViewsTests/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>${EXECUTABLE_NAME}</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.pixolity.ios.cookbook.app</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

chapter-tables/Constructing Headers and Footers in Table Views/Constructing Headers and Footers in Table Views.xcodeproj/project.pbxproj

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@
153153
9D2664AD1962FE33006BC5E7 /* Project object */ = {
154154
isa = PBXProject;
155155
attributes = {
156-
LastUpgradeCheck = 0600;
156+
LastSwiftUpdateCheck = 0700;
157+
LastUpgradeCheck = 0700;
157158
ORGANIZATIONNAME = "Pixolity Ltd.";
158159
TargetAttributes = {
159160
9D2664B41962FE33006BC5E7 = {
@@ -263,6 +264,7 @@
263264
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
264265
COPY_PHASE_STRIP = NO;
265266
ENABLE_STRICT_OBJC_MSGSEND = YES;
267+
ENABLE_TESTABILITY = YES;
266268
GCC_C_LANGUAGE_STANDARD = gnu99;
267269
GCC_DYNAMIC_NO_PIC = NO;
268270
GCC_OPTIMIZATION_LEVEL = 0;
@@ -329,6 +331,7 @@
329331
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
330332
INFOPLIST_FILE = "Constructing Headers and Footers in Table Views/Info.plist";
331333
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
334+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
332335
PRODUCT_NAME = "$(TARGET_NAME)";
333336
};
334337
name = Debug;
@@ -340,6 +343,7 @@
340343
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
341344
INFOPLIST_FILE = "Constructing Headers and Footers in Table Views/Info.plist";
342345
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
346+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
343347
PRODUCT_NAME = "$(TARGET_NAME)";
344348
};
345349
name = Release;
@@ -359,6 +363,7 @@
359363
INFOPLIST_FILE = "Constructing Headers and Footers in Table ViewsTests/Info.plist";
360364
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
361365
METAL_ENABLE_DEBUG_INFO = YES;
366+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
362367
PRODUCT_NAME = "$(TARGET_NAME)";
363368
TEST_HOST = "$(BUNDLE_LOADER)";
364369
};
@@ -375,6 +380,7 @@
375380
INFOPLIST_FILE = "Constructing Headers and Footers in Table ViewsTests/Info.plist";
376381
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
377382
METAL_ENABLE_DEBUG_INFO = NO;
383+
PRODUCT_BUNDLE_IDENTIFIER = com.pixolity.ios.cookbook.app;
378384
PRODUCT_NAME = "$(TARGET_NAME)";
379385
TEST_HOST = "$(BUNDLE_LOADER)";
380386
};
@@ -399,6 +405,7 @@
399405
9D2664D31962FE33006BC5E7 /* Release */,
400406
);
401407
defaultConfigurationIsVisible = 0;
408+
defaultConfigurationName = Release;
402409
};
403410
9D2664D41962FE33006BC5E7 /* Build configuration list for PBXNativeTarget "Constructing Headers and Footers in Table ViewsTests" */ = {
404411
isa = XCConfigurationList;
@@ -407,6 +414,7 @@
407414
9D2664D61962FE33006BC5E7 /* Release */,
408415
);
409416
defaultConfigurationIsVisible = 0;
417+
defaultConfigurationName = Release;
410418
};
411419
/* End XCConfigurationList section */
412420
};

chapter-tables/Constructing Headers and Footers in Table Views/Constructing Headers and Footers in Table Views.xcodeproj/xcuserdata/vandadnp.xcuserdatad/xcschemes/Constructing Headers and Footers in Table Views.xcscheme

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0600"
3+
LastUpgradeVersion = "0700"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -48,6 +48,8 @@
4848
ReferencedContainer = "container:Constructing Headers and Footers in Table Views.xcodeproj">
4949
</BuildableReference>
5050
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
5153
</TestAction>
5254
<LaunchAction
5355
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
@@ -57,8 +59,10 @@
5759
buildConfiguration = "Debug"
5860
ignoresPersistentStateOnLaunch = "NO"
5961
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
6063
allowLocationSimulation = "YES">
61-
<BuildableProductRunnable>
64+
<BuildableProductRunnable
65+
runnableDebuggingMode = "0">
6266
<BuildableReference
6367
BuildableIdentifier = "primary"
6468
BlueprintIdentifier = "9D2664B41962FE33006BC5E7"
@@ -76,7 +80,8 @@
7680
useCustomWorkingDirectory = "NO"
7781
buildConfiguration = "Release"
7882
debugDocumentVersioning = "YES">
79-
<BuildableProductRunnable>
83+
<BuildableProductRunnable
84+
runnableDebuggingMode = "0">
8085
<BuildableReference
8186
BuildableIdentifier = "primary"
8287
BlueprintIdentifier = "9D2664B41962FE33006BC5E7"

chapter-tables/Constructing Headers and Footers in Table Views/Constructing Headers and Footers in Table Views/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<key>CFBundleExecutable</key>
88
<string>${EXECUTABLE_NAME}</string>
99
<key>CFBundleIdentifier</key>
10-
<string>com.pixolity.ios.cookbook.app</string>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
1111
<key>CFBundleInfoDictionaryVersion</key>
1212
<string>6.0</string>
1313
<key>CFBundleName</key>

0 commit comments

Comments
 (0)