Skip to content

Commit 0728ed5

Browse files
committed
new layer subclass animation example, improve shape animation example, improve pixel transparency detection code
1 parent e8258e4 commit 0728ed5

File tree

16 files changed

+703
-1
lines changed

16 files changed

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

bk2ch04p148layerSubclass/LayerSubclass.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)