Skip to content

Commit ecb32b8

Browse files
committed
still even more example code from the first book
1 parent 0c2a5e6 commit ecb32b8

File tree

53 files changed

+4205
-0
lines changed

Some content is hidden

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

53 files changed

+4205
-0
lines changed
Lines changed: 296 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,296 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
32A5A81E1AFA5B9A0035587B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32A5A81D1AFA5B9A0035587B /* AppDelegate.swift */; };
11+
32A5A8201AFA5B9A0035587B /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32A5A81F1AFA5B9A0035587B /* ViewController.swift */; };
12+
32A5A8231AFA5B9A0035587B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 32A5A8211AFA5B9A0035587B /* Main.storyboard */; };
13+
32A5A8251AFA5B9A0035587B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 32A5A8241AFA5B9A0035587B /* Images.xcassets */; };
14+
32A5A8281AFA5B9A0035587B /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 32A5A8261AFA5B9A0035587B /* LaunchScreen.xib */; };
15+
/* End PBXBuildFile section */
16+
17+
/* Begin PBXFileReference section */
18+
32A5A8181AFA5B9A0035587B /* bk1ch05p227branching.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = bk1ch05p227branching.app; sourceTree = BUILT_PRODUCTS_DIR; };
19+
32A5A81C1AFA5B9A0035587B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
20+
32A5A81D1AFA5B9A0035587B /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
21+
32A5A81F1AFA5B9A0035587B /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
22+
32A5A8221AFA5B9A0035587B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
23+
32A5A8241AFA5B9A0035587B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
24+
32A5A8271AFA5B9A0035587B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = "<group>"; };
25+
/* End PBXFileReference section */
26+
27+
/* Begin PBXFrameworksBuildPhase section */
28+
32A5A8151AFA5B9A0035587B /* Frameworks */ = {
29+
isa = PBXFrameworksBuildPhase;
30+
buildActionMask = 2147483647;
31+
files = (
32+
);
33+
runOnlyForDeploymentPostprocessing = 0;
34+
};
35+
/* End PBXFrameworksBuildPhase section */
36+
37+
/* Begin PBXGroup section */
38+
32A5A80F1AFA5B9A0035587B = {
39+
isa = PBXGroup;
40+
children = (
41+
32A5A81A1AFA5B9A0035587B /* bk1ch05p227branching */,
42+
32A5A8191AFA5B9A0035587B /* Products */,
43+
);
44+
sourceTree = "<group>";
45+
};
46+
32A5A8191AFA5B9A0035587B /* Products */ = {
47+
isa = PBXGroup;
48+
children = (
49+
32A5A8181AFA5B9A0035587B /* bk1ch05p227branching.app */,
50+
);
51+
name = Products;
52+
sourceTree = "<group>";
53+
};
54+
32A5A81A1AFA5B9A0035587B /* bk1ch05p227branching */ = {
55+
isa = PBXGroup;
56+
children = (
57+
32A5A81D1AFA5B9A0035587B /* AppDelegate.swift */,
58+
32A5A81F1AFA5B9A0035587B /* ViewController.swift */,
59+
32A5A8211AFA5B9A0035587B /* Main.storyboard */,
60+
32A5A8241AFA5B9A0035587B /* Images.xcassets */,
61+
32A5A8261AFA5B9A0035587B /* LaunchScreen.xib */,
62+
32A5A81B1AFA5B9A0035587B /* Supporting Files */,
63+
);
64+
path = bk1ch05p227branching;
65+
sourceTree = "<group>";
66+
};
67+
32A5A81B1AFA5B9A0035587B /* Supporting Files */ = {
68+
isa = PBXGroup;
69+
children = (
70+
32A5A81C1AFA5B9A0035587B /* Info.plist */,
71+
);
72+
name = "Supporting Files";
73+
sourceTree = "<group>";
74+
};
75+
/* End PBXGroup section */
76+
77+
/* Begin PBXNativeTarget section */
78+
32A5A8171AFA5B9A0035587B /* bk1ch05p227branching */ = {
79+
isa = PBXNativeTarget;
80+
buildConfigurationList = 32A5A8371AFA5B9A0035587B /* Build configuration list for PBXNativeTarget "bk1ch05p227branching" */;
81+
buildPhases = (
82+
32A5A8141AFA5B9A0035587B /* Sources */,
83+
32A5A8151AFA5B9A0035587B /* Frameworks */,
84+
32A5A8161AFA5B9A0035587B /* Resources */,
85+
);
86+
buildRules = (
87+
);
88+
dependencies = (
89+
);
90+
name = bk1ch05p227branching;
91+
productName = bk1ch05p227branching;
92+
productReference = 32A5A8181AFA5B9A0035587B /* bk1ch05p227branching.app */;
93+
productType = "com.apple.product-type.application";
94+
};
95+
/* End PBXNativeTarget section */
96+
97+
/* Begin PBXProject section */
98+
32A5A8101AFA5B9A0035587B /* Project object */ = {
99+
isa = PBXProject;
100+
attributes = {
101+
LastUpgradeCheck = 0630;
102+
ORGANIZATIONNAME = "Matt Neuburg";
103+
TargetAttributes = {
104+
32A5A8171AFA5B9A0035587B = {
105+
CreatedOnToolsVersion = 6.3.1;
106+
};
107+
};
108+
};
109+
buildConfigurationList = 32A5A8131AFA5B9A0035587B /* Build configuration list for PBXProject "bk1ch05p227branching" */;
110+
compatibilityVersion = "Xcode 3.2";
111+
developmentRegion = English;
112+
hasScannedForEncodings = 0;
113+
knownRegions = (
114+
en,
115+
Base,
116+
);
117+
mainGroup = 32A5A80F1AFA5B9A0035587B;
118+
productRefGroup = 32A5A8191AFA5B9A0035587B /* Products */;
119+
projectDirPath = "";
120+
projectRoot = "";
121+
targets = (
122+
32A5A8171AFA5B9A0035587B /* bk1ch05p227branching */,
123+
);
124+
};
125+
/* End PBXProject section */
126+
127+
/* Begin PBXResourcesBuildPhase section */
128+
32A5A8161AFA5B9A0035587B /* Resources */ = {
129+
isa = PBXResourcesBuildPhase;
130+
buildActionMask = 2147483647;
131+
files = (
132+
32A5A8231AFA5B9A0035587B /* Main.storyboard in Resources */,
133+
32A5A8281AFA5B9A0035587B /* LaunchScreen.xib in Resources */,
134+
32A5A8251AFA5B9A0035587B /* Images.xcassets in Resources */,
135+
);
136+
runOnlyForDeploymentPostprocessing = 0;
137+
};
138+
/* End PBXResourcesBuildPhase section */
139+
140+
/* Begin PBXSourcesBuildPhase section */
141+
32A5A8141AFA5B9A0035587B /* Sources */ = {
142+
isa = PBXSourcesBuildPhase;
143+
buildActionMask = 2147483647;
144+
files = (
145+
32A5A8201AFA5B9A0035587B /* ViewController.swift in Sources */,
146+
32A5A81E1AFA5B9A0035587B /* AppDelegate.swift in Sources */,
147+
);
148+
runOnlyForDeploymentPostprocessing = 0;
149+
};
150+
/* End PBXSourcesBuildPhase section */
151+
152+
/* Begin PBXVariantGroup section */
153+
32A5A8211AFA5B9A0035587B /* Main.storyboard */ = {
154+
isa = PBXVariantGroup;
155+
children = (
156+
32A5A8221AFA5B9A0035587B /* Base */,
157+
);
158+
name = Main.storyboard;
159+
sourceTree = "<group>";
160+
};
161+
32A5A8261AFA5B9A0035587B /* LaunchScreen.xib */ = {
162+
isa = PBXVariantGroup;
163+
children = (
164+
32A5A8271AFA5B9A0035587B /* Base */,
165+
);
166+
name = LaunchScreen.xib;
167+
sourceTree = "<group>";
168+
};
169+
/* End PBXVariantGroup section */
170+
171+
/* Begin XCBuildConfiguration section */
172+
32A5A8351AFA5B9A0035587B /* Debug */ = {
173+
isa = XCBuildConfiguration;
174+
buildSettings = {
175+
ALWAYS_SEARCH_USER_PATHS = NO;
176+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
177+
CLANG_CXX_LIBRARY = "libc++";
178+
CLANG_ENABLE_MODULES = YES;
179+
CLANG_ENABLE_OBJC_ARC = YES;
180+
CLANG_WARN_BOOL_CONVERSION = YES;
181+
CLANG_WARN_CONSTANT_CONVERSION = YES;
182+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
183+
CLANG_WARN_EMPTY_BODY = YES;
184+
CLANG_WARN_ENUM_CONVERSION = YES;
185+
CLANG_WARN_INT_CONVERSION = YES;
186+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
187+
CLANG_WARN_UNREACHABLE_CODE = YES;
188+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
189+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
190+
COPY_PHASE_STRIP = NO;
191+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
192+
ENABLE_STRICT_OBJC_MSGSEND = YES;
193+
GCC_C_LANGUAGE_STANDARD = gnu99;
194+
GCC_DYNAMIC_NO_PIC = NO;
195+
GCC_NO_COMMON_BLOCKS = YES;
196+
GCC_OPTIMIZATION_LEVEL = 0;
197+
GCC_PREPROCESSOR_DEFINITIONS = (
198+
"DEBUG=1",
199+
"$(inherited)",
200+
);
201+
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
202+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
203+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
204+
GCC_WARN_UNDECLARED_SELECTOR = YES;
205+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
206+
GCC_WARN_UNUSED_FUNCTION = YES;
207+
GCC_WARN_UNUSED_VARIABLE = YES;
208+
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
209+
MTL_ENABLE_DEBUG_INFO = YES;
210+
ONLY_ACTIVE_ARCH = YES;
211+
SDKROOT = iphoneos;
212+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
213+
};
214+
name = Debug;
215+
};
216+
32A5A8361AFA5B9A0035587B /* Release */ = {
217+
isa = XCBuildConfiguration;
218+
buildSettings = {
219+
ALWAYS_SEARCH_USER_PATHS = NO;
220+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
221+
CLANG_CXX_LIBRARY = "libc++";
222+
CLANG_ENABLE_MODULES = YES;
223+
CLANG_ENABLE_OBJC_ARC = YES;
224+
CLANG_WARN_BOOL_CONVERSION = YES;
225+
CLANG_WARN_CONSTANT_CONVERSION = YES;
226+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
227+
CLANG_WARN_EMPTY_BODY = YES;
228+
CLANG_WARN_ENUM_CONVERSION = YES;
229+
CLANG_WARN_INT_CONVERSION = YES;
230+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
231+
CLANG_WARN_UNREACHABLE_CODE = YES;
232+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
233+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
234+
COPY_PHASE_STRIP = NO;
235+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
236+
ENABLE_NS_ASSERTIONS = NO;
237+
ENABLE_STRICT_OBJC_MSGSEND = YES;
238+
GCC_C_LANGUAGE_STANDARD = gnu99;
239+
GCC_NO_COMMON_BLOCKS = YES;
240+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
241+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
242+
GCC_WARN_UNDECLARED_SELECTOR = YES;
243+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
244+
GCC_WARN_UNUSED_FUNCTION = YES;
245+
GCC_WARN_UNUSED_VARIABLE = YES;
246+
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
247+
MTL_ENABLE_DEBUG_INFO = NO;
248+
SDKROOT = iphoneos;
249+
VALIDATE_PRODUCT = YES;
250+
};
251+
name = Release;
252+
};
253+
32A5A8381AFA5B9A0035587B /* Debug */ = {
254+
isa = XCBuildConfiguration;
255+
buildSettings = {
256+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
257+
INFOPLIST_FILE = bk1ch05p227branching/Info.plist;
258+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
259+
PRODUCT_NAME = "$(TARGET_NAME)";
260+
};
261+
name = Debug;
262+
};
263+
32A5A8391AFA5B9A0035587B /* Release */ = {
264+
isa = XCBuildConfiguration;
265+
buildSettings = {
266+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
267+
INFOPLIST_FILE = bk1ch05p227branching/Info.plist;
268+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
269+
PRODUCT_NAME = "$(TARGET_NAME)";
270+
};
271+
name = Release;
272+
};
273+
/* End XCBuildConfiguration section */
274+
275+
/* Begin XCConfigurationList section */
276+
32A5A8131AFA5B9A0035587B /* Build configuration list for PBXProject "bk1ch05p227branching" */ = {
277+
isa = XCConfigurationList;
278+
buildConfigurations = (
279+
32A5A8351AFA5B9A0035587B /* Debug */,
280+
32A5A8361AFA5B9A0035587B /* Release */,
281+
);
282+
defaultConfigurationIsVisible = 0;
283+
defaultConfigurationName = Release;
284+
};
285+
32A5A8371AFA5B9A0035587B /* Build configuration list for PBXNativeTarget "bk1ch05p227branching" */ = {
286+
isa = XCConfigurationList;
287+
buildConfigurations = (
288+
32A5A8381AFA5B9A0035587B /* Debug */,
289+
32A5A8391AFA5B9A0035587B /* Release */,
290+
);
291+
defaultConfigurationIsVisible = 0;
292+
};
293+
/* End XCConfigurationList section */
294+
};
295+
rootObject = 32A5A8101AFA5B9A0035587B /* Project object */;
296+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
3+
import UIKit
4+
5+
@UIApplicationMain
6+
class AppDelegate: UIResponder, UIApplicationDelegate {
7+
8+
var window: UIWindow?
9+
10+
11+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
12+
// Override point for customization after application launch.
13+
return true
14+
}
15+
16+
17+
18+
}
19+
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6214" systemVersion="14A314h" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6207"/>
5+
<capability name="Constraints with non-1.0 multipliers" minToolsVersion="5.1"/>
6+
</dependencies>
7+
<objects>
8+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
9+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
10+
<view contentMode="scaleToFill" id="iN0-l3-epB">
11+
<rect key="frame" x="0.0" y="0.0" width="480" height="480"/>
12+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
13+
<subviews>
14+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" Copyright (c) 2015 Matt Neuburg. All rights reserved." textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumFontSize="9" translatesAutoresizingMaskIntoConstraints="NO" id="8ie-xW-0ye">
15+
<rect key="frame" x="20" y="439" width="441" height="21"/>
16+
<fontDescription key="fontDescription" type="system" pointSize="17"/>
17+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
18+
<nil key="highlightedColor"/>
19+
</label>
20+
<label opaque="NO" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="bk1ch05p227branching" textAlignment="center" lineBreakMode="middleTruncation" baselineAdjustment="alignBaselines" minimumFontSize="18" translatesAutoresizingMaskIntoConstraints="NO" id="kId-c2-rCX">
21+
<rect key="frame" x="20" y="140" width="441" height="43"/>
22+
<fontDescription key="fontDescription" type="boldSystem" pointSize="36"/>
23+
<color key="textColor" cocoaTouchSystemColor="darkTextColor"/>
24+
<nil key="highlightedColor"/>
25+
</label>
26+
</subviews>
27+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
28+
<constraints>
29+
<constraint firstItem="kId-c2-rCX" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="bottom" multiplier="1/3" constant="1" id="5cJ-9S-tgC"/>
30+
<constraint firstAttribute="centerX" secondItem="kId-c2-rCX" secondAttribute="centerX" id="Koa-jz-hwk"/>
31+
<constraint firstAttribute="bottom" secondItem="8ie-xW-0ye" secondAttribute="bottom" constant="20" id="Kzo-t9-V3l"/>
32+
<constraint firstItem="8ie-xW-0ye" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="MfP-vx-nX0"/>
33+
<constraint firstAttribute="centerX" secondItem="8ie-xW-0ye" secondAttribute="centerX" id="ZEH-qu-HZ9"/>
34+
<constraint firstItem="kId-c2-rCX" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" symbolic="YES" id="fvb-Df-36g"/>
35+
</constraints>
36+
<nil key="simulatedStatusBarMetrics"/>
37+
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
38+
<point key="canvasLocation" x="548" y="455"/>
39+
</view>
40+
</objects>
41+
</document>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="vXZ-lx-hvc">
3+
<dependencies>
4+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
5+
</dependencies>
6+
<scenes>
7+
<!--View Controller-->
8+
<scene sceneID="ufC-wZ-h7g">
9+
<objects>
10+
<viewController id="vXZ-lx-hvc" customClass="ViewController" customModuleProvider="target" sceneMemberID="viewController">
11+
<layoutGuides>
12+
<viewControllerLayoutGuide type="top" id="jyV-Pf-zRb"/>
13+
<viewControllerLayoutGuide type="bottom" id="2fi-mo-0CV"/>
14+
</layoutGuides>
15+
<view key="view" contentMode="scaleToFill" id="kh9-bI-dsS">
16+
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
17+
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
18+
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
19+
</view>
20+
</viewController>
21+
<placeholder placeholderIdentifier="IBFirstResponder" id="x5A-6p-PRh" sceneMemberID="firstResponder"/>
22+
</objects>
23+
</scene>
24+
</scenes>
25+
</document>

0 commit comments

Comments
 (0)