Skip to content

Commit f99c17c

Browse files
committed
book 2 chapter 3 examples
1 parent e16cad5 commit f99c17c

File tree

23 files changed

+892
-23
lines changed

23 files changed

+892
-23
lines changed

bk2ch03p095layerHierarchy/ch16p445layerHierarchy.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
GCC_PRECOMPILE_PREFIX_HEADER = YES;
264264
GCC_PREFIX_HEADER = "ch16p445layerHierarchy/ch16p445layerHierarchy-Prefix.pch";
265265
INFOPLIST_FILE = "ch16p445layerHierarchy/ch16p445layerHierarchy-Info.plist";
266-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
266+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
267267
LD_RUNPATH_SEARCH_PATHS = (
268268
"$(inherited)",
269269
"@executable_path/Frameworks",
@@ -285,7 +285,7 @@
285285
GCC_PRECOMPILE_PREFIX_HEADER = YES;
286286
GCC_PREFIX_HEADER = "ch16p445layerHierarchy/ch16p445layerHierarchy-Prefix.pch";
287287
INFOPLIST_FILE = "ch16p445layerHierarchy/ch16p445layerHierarchy-Info.plist";
288-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
288+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
289289
LD_RUNPATH_SEARCH_PATHS = (
290290
"$(inherited)",
291291
"@executable_path/Frameworks",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1300"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "C907902217B2C40C0060B684"
18+
BuildableName = "ch16p445layerHierarchy.app"
19+
BlueprintName = "ch16p445layerHierarchy"
20+
ReferencedContainer = "container:ch16p445layerHierarchy.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "C907902217B2C40C0060B684"
48+
BuildableName = "ch16p445layerHierarchy.app"
49+
BlueprintName = "ch16p445layerHierarchy"
50+
ReferencedContainer = "container:ch16p445layerHierarchy.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "C907902217B2C40C0060B684"
65+
BuildableName = "ch16p445layerHierarchy.app"
66+
BlueprintName = "ch16p445layerHierarchy"
67+
ReferencedContainer = "container:ch16p445layerHierarchy.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

bk2ch03p095layerHierarchy/ch16p445layerHierarchy/ViewController.swift

+12-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,18 @@ class ViewController : UIViewController {
6262
lay3.backgroundColor = UIColor(red: 1, green: 0, blue: 0, alpha: 1).cgColor
6363
lay3.frame = CGRect(43, 197, 160, 230)
6464
self.view.layer.addSublayer(lay3)
65-
65+
66+
/*
67+
delay(1) {
68+
lay1.cornerRadius = 40
69+
delay(1) {
70+
lay1.cornerCurve = .continuous
71+
}
72+
lay3.cornerCurve = .circular
73+
lay3.cornerRadius = 40
74+
}
75+
*/
76+
6677
// let iv = UIImageView(image:UIImage(named:"smiley"))
6778
// self.view.addSubview(iv)
6879
// iv.frame.origin = CGPoint(180,180)

bk2ch03p101drawingIntoLayer/ch16p450drawingIntoLayer.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@
269269
GCC_PRECOMPILE_PREFIX_HEADER = YES;
270270
GCC_PREFIX_HEADER = "ch16p450drawingIntoLayer/ch16p450drawingIntoLayer-Prefix.pch";
271271
INFOPLIST_FILE = "ch16p450drawingIntoLayer/ch16p450drawingIntoLayer-Info.plist";
272-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
272+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
273273
LD_RUNPATH_SEARCH_PATHS = (
274274
"$(inherited)",
275275
"@executable_path/Frameworks",
@@ -293,7 +293,7 @@
293293
GCC_PRECOMPILE_PREFIX_HEADER = YES;
294294
GCC_PREFIX_HEADER = "ch16p450drawingIntoLayer/ch16p450drawingIntoLayer-Prefix.pch";
295295
INFOPLIST_FILE = "ch16p450drawingIntoLayer/ch16p450drawingIntoLayer-Info.plist";
296-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
296+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
297297
LD_RUNPATH_SEARCH_PATHS = (
298298
"$(inherited)",
299299
"@executable_path/Frameworks",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1300"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "C907429517B3078100506DAF"
18+
BuildableName = "ch16p450drawingIntoLayer.app"
19+
BlueprintName = "ch16p450drawingIntoLayer"
20+
ReferencedContainer = "container:ch16p450drawingIntoLayer.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "C907429517B3078100506DAF"
48+
BuildableName = "ch16p450drawingIntoLayer.app"
49+
BlueprintName = "ch16p450drawingIntoLayer"
50+
ReferencedContainer = "container:ch16p450drawingIntoLayer.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "C907429517B3078100506DAF"
65+
BuildableName = "ch16p450drawingIntoLayer.app"
66+
BlueprintName = "ch16p450drawingIntoLayer"
67+
ReferencedContainer = "container:ch16p450drawingIntoLayer.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

bk2ch03p108compass/ch16p457compass.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
GCC_PRECOMPILE_PREFIX_HEADER = YES;
264264
GCC_PREFIX_HEADER = "ch16p457compass/ch16p457compass-Prefix.pch";
265265
INFOPLIST_FILE = "ch16p457compass/ch16p457compass-Info.plist";
266-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
266+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
267267
LD_RUNPATH_SEARCH_PATHS = (
268268
"$(inherited)",
269269
"@executable_path/Frameworks",
@@ -286,7 +286,7 @@
286286
GCC_PRECOMPILE_PREFIX_HEADER = YES;
287287
GCC_PREFIX_HEADER = "ch16p457compass/ch16p457compass-Prefix.pch";
288288
INFOPLIST_FILE = "ch16p457compass/ch16p457compass-Info.plist";
289-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
289+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
290290
LD_RUNPATH_SEARCH_PATHS = (
291291
"$(inherited)",
292292
"@executable_path/Frameworks",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1300"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "C9D8A98017B2B04A00E0809D"
18+
BuildableName = "ch16p457compass.app"
19+
BlueprintName = "ch16p457compass"
20+
ReferencedContainer = "container:ch16p457compass.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "C9D8A98017B2B04A00E0809D"
48+
BuildableName = "ch16p457compass.app"
49+
BlueprintName = "ch16p457compass"
50+
ReferencedContainer = "container:ch16p457compass.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "C9D8A98017B2B04A00E0809D"
65+
BuildableName = "ch16p457compass.app"
66+
BlueprintName = "ch16p457compass"
67+
ReferencedContainer = "container:ch16p457compass.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

bk2ch03p109ConicGradientLayer/ConicGradientLayer.xcodeproj/project.pbxproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
CODE_SIGN_STYLE = Automatic;
286286
DEVELOPMENT_TEAM = W3LHX5RGV2;
287287
INFOPLIST_FILE = ConicGradientLayer/Info.plist;
288-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
288+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
289289
LD_RUNPATH_SEARCH_PATHS = (
290290
"$(inherited)",
291291
"@executable_path/Frameworks",
@@ -304,7 +304,7 @@
304304
CODE_SIGN_STYLE = Automatic;
305305
DEVELOPMENT_TEAM = W3LHX5RGV2;
306306
INFOPLIST_FILE = ConicGradientLayer/Info.plist;
307-
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
307+
IPHONEOS_DEPLOYMENT_TARGET = 15.0;
308308
LD_RUNPATH_SEARCH_PATHS = (
309309
"$(inherited)",
310310
"@executable_path/Frameworks",

0 commit comments

Comments
 (0)