Skip to content

Commit 7dc0300

Browse files
committed
new example for key commands and pointer interactions
1 parent 24124be commit 7dc0300

File tree

16 files changed

+837
-0
lines changed

16 files changed

+837
-0
lines changed

bk2ch08p464collectionViewFlowLayout2/ch21p748collectionViewFlowLayout2.xcodeproj/project.pbxproj

+2
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@
498498
SWIFT_OBJC_BRIDGING_HEADER = "";
499499
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
500500
SWIFT_VERSION = 5.0;
501+
TARGETED_DEVICE_FAMILY = "1,2";
501502
WRAPPER_EXTENSION = app;
502503
};
503504
name = Debug;
@@ -520,6 +521,7 @@
520521
PRODUCT_NAME = "$(TARGET_NAME)";
521522
SWIFT_OBJC_BRIDGING_HEADER = "";
522523
SWIFT_VERSION = 5.0;
524+
TARGETED_DEVICE_FAMILY = "1,2";
523525
WRAPPER_EXTENSION = app;
524526
};
525527
name = Release;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,358 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 50;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
81B146B824D7ABB900AE4BF3 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B146B724D7ABB900AE4BF3 /* AppDelegate.swift */; };
11+
81B146BA24D7ABB900AE4BF3 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B146B924D7ABB900AE4BF3 /* SceneDelegate.swift */; };
12+
81B146BC24D7ABB900AE4BF3 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81B146BB24D7ABB900AE4BF3 /* ViewController.swift */; };
13+
81B146BF24D7ABB900AE4BF3 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81B146BD24D7ABB900AE4BF3 /* Main.storyboard */; };
14+
81B146C124D7ABBA00AE4BF3 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81B146C024D7ABBA00AE4BF3 /* Assets.xcassets */; };
15+
81B146C424D7ABBA00AE4BF3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81B146C224D7ABBA00AE4BF3 /* LaunchScreen.storyboard */; };
16+
81B146CE24D874F000AE4BF3 /* moe.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 81B146CB24D874EF00AE4BF3 /* moe.jpg */; };
17+
81B146CF24D874F000AE4BF3 /* jack.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 81B146CC24D874F000AE4BF3 /* jack.jpg */; };
18+
81B146D024D874F000AE4BF3 /* manny.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 81B146CD24D874F000AE4BF3 /* manny.jpg */; };
19+
/* End PBXBuildFile section */
20+
21+
/* Begin PBXFileReference section */
22+
81B146B424D7ABB900AE4BF3 /* KeyCommands.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = KeyCommands.app; sourceTree = BUILT_PRODUCTS_DIR; };
23+
81B146B724D7ABB900AE4BF3 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
24+
81B146B924D7ABB900AE4BF3 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
25+
81B146BB24D7ABB900AE4BF3 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
26+
81B146BE24D7ABB900AE4BF3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
27+
81B146C024D7ABBA00AE4BF3 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
28+
81B146C324D7ABBA00AE4BF3 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
29+
81B146C524D7ABBA00AE4BF3 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
30+
81B146CB24D874EF00AE4BF3 /* moe.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = moe.jpg; sourceTree = "<group>"; };
31+
81B146CC24D874F000AE4BF3 /* jack.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = jack.jpg; sourceTree = "<group>"; };
32+
81B146CD24D874F000AE4BF3 /* manny.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = manny.jpg; sourceTree = "<group>"; };
33+
/* End PBXFileReference section */
34+
35+
/* Begin PBXFrameworksBuildPhase section */
36+
81B146B124D7ABB900AE4BF3 /* Frameworks */ = {
37+
isa = PBXFrameworksBuildPhase;
38+
buildActionMask = 2147483647;
39+
files = (
40+
);
41+
runOnlyForDeploymentPostprocessing = 0;
42+
};
43+
/* End PBXFrameworksBuildPhase section */
44+
45+
/* Begin PBXGroup section */
46+
81B146AB24D7ABB900AE4BF3 = {
47+
isa = PBXGroup;
48+
children = (
49+
81B146B624D7ABB900AE4BF3 /* KeyCommands */,
50+
81B146B524D7ABB900AE4BF3 /* Products */,
51+
);
52+
sourceTree = "<group>";
53+
};
54+
81B146B524D7ABB900AE4BF3 /* Products */ = {
55+
isa = PBXGroup;
56+
children = (
57+
81B146B424D7ABB900AE4BF3 /* KeyCommands.app */,
58+
);
59+
name = Products;
60+
sourceTree = "<group>";
61+
};
62+
81B146B624D7ABB900AE4BF3 /* KeyCommands */ = {
63+
isa = PBXGroup;
64+
children = (
65+
81B146B724D7ABB900AE4BF3 /* AppDelegate.swift */,
66+
81B146B924D7ABB900AE4BF3 /* SceneDelegate.swift */,
67+
81B146BB24D7ABB900AE4BF3 /* ViewController.swift */,
68+
81B146BD24D7ABB900AE4BF3 /* Main.storyboard */,
69+
81B146C024D7ABBA00AE4BF3 /* Assets.xcassets */,
70+
81B146CC24D874F000AE4BF3 /* jack.jpg */,
71+
81B146CD24D874F000AE4BF3 /* manny.jpg */,
72+
81B146CB24D874EF00AE4BF3 /* moe.jpg */,
73+
81B146C224D7ABBA00AE4BF3 /* LaunchScreen.storyboard */,
74+
81B146C524D7ABBA00AE4BF3 /* Info.plist */,
75+
);
76+
path = KeyCommands;
77+
sourceTree = "<group>";
78+
};
79+
/* End PBXGroup section */
80+
81+
/* Begin PBXNativeTarget section */
82+
81B146B324D7ABB900AE4BF3 /* KeyCommands */ = {
83+
isa = PBXNativeTarget;
84+
buildConfigurationList = 81B146C824D7ABBA00AE4BF3 /* Build configuration list for PBXNativeTarget "KeyCommands" */;
85+
buildPhases = (
86+
81B146B024D7ABB900AE4BF3 /* Sources */,
87+
81B146B124D7ABB900AE4BF3 /* Frameworks */,
88+
81B146B224D7ABB900AE4BF3 /* Resources */,
89+
);
90+
buildRules = (
91+
);
92+
dependencies = (
93+
);
94+
name = KeyCommands;
95+
productName = KeyCommands;
96+
productReference = 81B146B424D7ABB900AE4BF3 /* KeyCommands.app */;
97+
productType = "com.apple.product-type.application";
98+
};
99+
/* End PBXNativeTarget section */
100+
101+
/* Begin PBXProject section */
102+
81B146AC24D7ABB900AE4BF3 /* Project object */ = {
103+
isa = PBXProject;
104+
attributes = {
105+
LastSwiftUpdateCheck = 1200;
106+
LastUpgradeCheck = 1200;
107+
TargetAttributes = {
108+
81B146B324D7ABB900AE4BF3 = {
109+
CreatedOnToolsVersion = 12.0;
110+
};
111+
};
112+
};
113+
buildConfigurationList = 81B146AF24D7ABB900AE4BF3 /* Build configuration list for PBXProject "KeyCommands" */;
114+
compatibilityVersion = "Xcode 9.3";
115+
developmentRegion = en;
116+
hasScannedForEncodings = 0;
117+
knownRegions = (
118+
en,
119+
Base,
120+
);
121+
mainGroup = 81B146AB24D7ABB900AE4BF3;
122+
productRefGroup = 81B146B524D7ABB900AE4BF3 /* Products */;
123+
projectDirPath = "";
124+
projectRoot = "";
125+
targets = (
126+
81B146B324D7ABB900AE4BF3 /* KeyCommands */,
127+
);
128+
};
129+
/* End PBXProject section */
130+
131+
/* Begin PBXResourcesBuildPhase section */
132+
81B146B224D7ABB900AE4BF3 /* Resources */ = {
133+
isa = PBXResourcesBuildPhase;
134+
buildActionMask = 2147483647;
135+
files = (
136+
81B146C424D7ABBA00AE4BF3 /* LaunchScreen.storyboard in Resources */,
137+
81B146CF24D874F000AE4BF3 /* jack.jpg in Resources */,
138+
81B146C124D7ABBA00AE4BF3 /* Assets.xcassets in Resources */,
139+
81B146D024D874F000AE4BF3 /* manny.jpg in Resources */,
140+
81B146BF24D7ABB900AE4BF3 /* Main.storyboard in Resources */,
141+
81B146CE24D874F000AE4BF3 /* moe.jpg in Resources */,
142+
);
143+
runOnlyForDeploymentPostprocessing = 0;
144+
};
145+
/* End PBXResourcesBuildPhase section */
146+
147+
/* Begin PBXSourcesBuildPhase section */
148+
81B146B024D7ABB900AE4BF3 /* Sources */ = {
149+
isa = PBXSourcesBuildPhase;
150+
buildActionMask = 2147483647;
151+
files = (
152+
81B146BC24D7ABB900AE4BF3 /* ViewController.swift in Sources */,
153+
81B146B824D7ABB900AE4BF3 /* AppDelegate.swift in Sources */,
154+
81B146BA24D7ABB900AE4BF3 /* SceneDelegate.swift in Sources */,
155+
);
156+
runOnlyForDeploymentPostprocessing = 0;
157+
};
158+
/* End PBXSourcesBuildPhase section */
159+
160+
/* Begin PBXVariantGroup section */
161+
81B146BD24D7ABB900AE4BF3 /* Main.storyboard */ = {
162+
isa = PBXVariantGroup;
163+
children = (
164+
81B146BE24D7ABB900AE4BF3 /* Base */,
165+
);
166+
name = Main.storyboard;
167+
sourceTree = "<group>";
168+
};
169+
81B146C224D7ABBA00AE4BF3 /* LaunchScreen.storyboard */ = {
170+
isa = PBXVariantGroup;
171+
children = (
172+
81B146C324D7ABBA00AE4BF3 /* Base */,
173+
);
174+
name = LaunchScreen.storyboard;
175+
sourceTree = "<group>";
176+
};
177+
/* End PBXVariantGroup section */
178+
179+
/* Begin XCBuildConfiguration section */
180+
81B146C624D7ABBA00AE4BF3 /* Debug */ = {
181+
isa = XCBuildConfiguration;
182+
buildSettings = {
183+
ALWAYS_SEARCH_USER_PATHS = NO;
184+
CLANG_ANALYZER_NONNULL = YES;
185+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
186+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
187+
CLANG_CXX_LIBRARY = "libc++";
188+
CLANG_ENABLE_MODULES = YES;
189+
CLANG_ENABLE_OBJC_ARC = YES;
190+
CLANG_ENABLE_OBJC_WEAK = YES;
191+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
192+
CLANG_WARN_BOOL_CONVERSION = YES;
193+
CLANG_WARN_COMMA = YES;
194+
CLANG_WARN_CONSTANT_CONVERSION = YES;
195+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
196+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
197+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
198+
CLANG_WARN_EMPTY_BODY = YES;
199+
CLANG_WARN_ENUM_CONVERSION = YES;
200+
CLANG_WARN_INFINITE_RECURSION = YES;
201+
CLANG_WARN_INT_CONVERSION = YES;
202+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
203+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
204+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
205+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
206+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
207+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
208+
CLANG_WARN_STRICT_PROTOTYPES = YES;
209+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
210+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
211+
CLANG_WARN_UNREACHABLE_CODE = YES;
212+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
213+
COPY_PHASE_STRIP = NO;
214+
DEBUG_INFORMATION_FORMAT = dwarf;
215+
ENABLE_STRICT_OBJC_MSGSEND = YES;
216+
ENABLE_TESTABILITY = YES;
217+
GCC_C_LANGUAGE_STANDARD = gnu11;
218+
GCC_DYNAMIC_NO_PIC = NO;
219+
GCC_NO_COMMON_BLOCKS = YES;
220+
GCC_OPTIMIZATION_LEVEL = 0;
221+
GCC_PREPROCESSOR_DEFINITIONS = (
222+
"DEBUG=1",
223+
"$(inherited)",
224+
);
225+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
226+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
227+
GCC_WARN_UNDECLARED_SELECTOR = YES;
228+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
229+
GCC_WARN_UNUSED_FUNCTION = YES;
230+
GCC_WARN_UNUSED_VARIABLE = YES;
231+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
232+
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
233+
MTL_FAST_MATH = YES;
234+
ONLY_ACTIVE_ARCH = YES;
235+
SDKROOT = iphoneos;
236+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
237+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
238+
};
239+
name = Debug;
240+
};
241+
81B146C724D7ABBA00AE4BF3 /* Release */ = {
242+
isa = XCBuildConfiguration;
243+
buildSettings = {
244+
ALWAYS_SEARCH_USER_PATHS = NO;
245+
CLANG_ANALYZER_NONNULL = YES;
246+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
247+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
248+
CLANG_CXX_LIBRARY = "libc++";
249+
CLANG_ENABLE_MODULES = YES;
250+
CLANG_ENABLE_OBJC_ARC = YES;
251+
CLANG_ENABLE_OBJC_WEAK = YES;
252+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
253+
CLANG_WARN_BOOL_CONVERSION = YES;
254+
CLANG_WARN_COMMA = YES;
255+
CLANG_WARN_CONSTANT_CONVERSION = YES;
256+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
257+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
258+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
259+
CLANG_WARN_EMPTY_BODY = YES;
260+
CLANG_WARN_ENUM_CONVERSION = YES;
261+
CLANG_WARN_INFINITE_RECURSION = YES;
262+
CLANG_WARN_INT_CONVERSION = YES;
263+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
264+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
265+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
266+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
267+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
268+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
269+
CLANG_WARN_STRICT_PROTOTYPES = YES;
270+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
271+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
272+
CLANG_WARN_UNREACHABLE_CODE = YES;
273+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
274+
COPY_PHASE_STRIP = NO;
275+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
276+
ENABLE_NS_ASSERTIONS = NO;
277+
ENABLE_STRICT_OBJC_MSGSEND = YES;
278+
GCC_C_LANGUAGE_STANDARD = gnu11;
279+
GCC_NO_COMMON_BLOCKS = YES;
280+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
281+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
282+
GCC_WARN_UNDECLARED_SELECTOR = YES;
283+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
284+
GCC_WARN_UNUSED_FUNCTION = YES;
285+
GCC_WARN_UNUSED_VARIABLE = YES;
286+
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
287+
MTL_ENABLE_DEBUG_INFO = NO;
288+
MTL_FAST_MATH = YES;
289+
SDKROOT = iphoneos;
290+
SWIFT_COMPILATION_MODE = wholemodule;
291+
SWIFT_OPTIMIZATION_LEVEL = "-O";
292+
VALIDATE_PRODUCT = YES;
293+
};
294+
name = Release;
295+
};
296+
81B146C924D7ABBA00AE4BF3 /* Debug */ = {
297+
isa = XCBuildConfiguration;
298+
buildSettings = {
299+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
300+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
301+
CODE_SIGN_STYLE = Automatic;
302+
DEVELOPMENT_TEAM = W3LHX5RGV2;
303+
INFOPLIST_FILE = KeyCommands/Info.plist;
304+
LD_RUNPATH_SEARCH_PATHS = (
305+
"$(inherited)",
306+
"@executable_path/Frameworks",
307+
);
308+
PRODUCT_BUNDLE_IDENTIFIER = com.neuburg.matt.KeyCommands;
309+
PRODUCT_NAME = "$(TARGET_NAME)";
310+
SWIFT_VERSION = 5.0;
311+
TARGETED_DEVICE_FAMILY = "1,2";
312+
};
313+
name = Debug;
314+
};
315+
81B146CA24D7ABBA00AE4BF3 /* Release */ = {
316+
isa = XCBuildConfiguration;
317+
buildSettings = {
318+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
319+
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
320+
CODE_SIGN_STYLE = Automatic;
321+
DEVELOPMENT_TEAM = W3LHX5RGV2;
322+
INFOPLIST_FILE = KeyCommands/Info.plist;
323+
LD_RUNPATH_SEARCH_PATHS = (
324+
"$(inherited)",
325+
"@executable_path/Frameworks",
326+
);
327+
PRODUCT_BUNDLE_IDENTIFIER = com.neuburg.matt.KeyCommands;
328+
PRODUCT_NAME = "$(TARGET_NAME)";
329+
SWIFT_VERSION = 5.0;
330+
TARGETED_DEVICE_FAMILY = "1,2";
331+
};
332+
name = Release;
333+
};
334+
/* End XCBuildConfiguration section */
335+
336+
/* Begin XCConfigurationList section */
337+
81B146AF24D7ABB900AE4BF3 /* Build configuration list for PBXProject "KeyCommands" */ = {
338+
isa = XCConfigurationList;
339+
buildConfigurations = (
340+
81B146C624D7ABBA00AE4BF3 /* Debug */,
341+
81B146C724D7ABBA00AE4BF3 /* Release */,
342+
);
343+
defaultConfigurationIsVisible = 0;
344+
defaultConfigurationName = Release;
345+
};
346+
81B146C824D7ABBA00AE4BF3 /* Build configuration list for PBXNativeTarget "KeyCommands" */ = {
347+
isa = XCConfigurationList;
348+
buildConfigurations = (
349+
81B146C924D7ABBA00AE4BF3 /* Debug */,
350+
81B146CA24D7ABBA00AE4BF3 /* Release */,
351+
);
352+
defaultConfigurationIsVisible = 0;
353+
defaultConfigurationName = Release;
354+
};
355+
/* End XCConfigurationList section */
356+
};
357+
rootObject = 81B146AC24D7ABB900AE4BF3 /* Project object */;
358+
}

bk2ch09p494KeyCommandsAndPointers/KeyCommands.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>IDEDidComputeMac32BitWarning</key>
6+
<true/>
7+
</dict>
8+
</plist>

0 commit comments

Comments
 (0)