Skip to content

Commit 1ec8bf2

Browse files
committed
Auto Layout
1 parent ce0cd75 commit 1ec8bf2

File tree

25 files changed

+684
-3
lines changed

25 files changed

+684
-3
lines changed

3/HelloWorldAutoLayout.zip

28.8 KB
Binary file not shown.

3/HelloWorld/HelloWorld/Base.lproj/Main.storyboard renamed to 3/HelloWorldAutoLayout/HelloWorld/Base.lproj/Main.storyboard

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
2424
<subviews>
2525
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zw6-Od-UoW">
26-
<rect key="frame" x="147.5" y="318.5" width="80" height="30"/>
26+
<rect key="frame" x="147.5" y="318" width="80" height="30"/>
2727
<color key="backgroundColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
2828
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
2929
<state key="normal" title="Hello World"/>
@@ -32,7 +32,7 @@
3232
</connections>
3333
</button>
3434
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Welcome to Auto Layout" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="De5-xg-wQL">
35-
<rect key="frame" x="172" y="626" width="187" height="21"/>
35+
<rect key="frame" x="152" y="626" width="187" height="21"/>
3636
<fontDescription key="fontDescription" type="system" pointSize="17"/>
3737
<nil key="textColor"/>
3838
<nil key="highlightedColor"/>
@@ -41,7 +41,7 @@
4141
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
4242
<constraints>
4343
<constraint firstItem="zw6-Od-UoW" firstAttribute="centerX" secondItem="8bC-Xf-vdC" secondAttribute="centerX" id="2jD-a2-aeV"/>
44-
<constraint firstAttribute="trailingMargin" secondItem="De5-xg-wQL" secondAttribute="trailing" id="CNE-or-R91"/>
44+
<constraint firstAttribute="trailingMargin" secondItem="De5-xg-wQL" secondAttribute="trailing" constant="20" id="CNE-or-R91"/>
4545
<constraint firstItem="zw6-Od-UoW" firstAttribute="centerY" secondItem="8bC-Xf-vdC" secondAttribute="centerY" id="LDZ-uM-LP0"/>
4646
<constraint firstItem="wfy-db-euE" firstAttribute="top" secondItem="De5-xg-wQL" secondAttribute="bottom" constant="20" id="SXz-1Y-iF7"/>
4747
</constraints>

3/HelloWorldAutoLayoutExercise.zip

29.8 KB
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,309 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 46;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
EF4FEA7B1EFFC104003CDCD2 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF4FEA7A1EFFC104003CDCD2 /* AppDelegate.swift */; };
11+
EF4FEA7D1EFFC104003CDCD2 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF4FEA7C1EFFC104003CDCD2 /* ViewController.swift */; };
12+
EF4FEA801EFFC104003CDCD2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EF4FEA7E1EFFC104003CDCD2 /* Main.storyboard */; };
13+
EF4FEA821EFFC104003CDCD2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EF4FEA811EFFC104003CDCD2 /* Assets.xcassets */; };
14+
EF4FEA851EFFC104003CDCD2 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EF4FEA831EFFC104003CDCD2 /* LaunchScreen.storyboard */; };
15+
/* End PBXBuildFile section */
16+
17+
/* Begin PBXFileReference section */
18+
EF4FEA771EFFC104003CDCD2 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; };
19+
EF4FEA7A1EFFC104003CDCD2 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
20+
EF4FEA7C1EFFC104003CDCD2 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = "<group>"; };
21+
EF4FEA7F1EFFC104003CDCD2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
22+
EF4FEA811EFFC104003CDCD2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
23+
EF4FEA841EFFC104003CDCD2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
24+
EF4FEA861EFFC104003CDCD2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
25+
/* End PBXFileReference section */
26+
27+
/* Begin PBXFrameworksBuildPhase section */
28+
EF4FEA741EFFC104003CDCD2 /* Frameworks */ = {
29+
isa = PBXFrameworksBuildPhase;
30+
buildActionMask = 2147483647;
31+
files = (
32+
);
33+
runOnlyForDeploymentPostprocessing = 0;
34+
};
35+
/* End PBXFrameworksBuildPhase section */
36+
37+
/* Begin PBXGroup section */
38+
EF4FEA6E1EFFC104003CDCD2 = {
39+
isa = PBXGroup;
40+
children = (
41+
EF4FEA791EFFC104003CDCD2 /* HelloWorld */,
42+
EF4FEA781EFFC104003CDCD2 /* Products */,
43+
);
44+
sourceTree = "<group>";
45+
};
46+
EF4FEA781EFFC104003CDCD2 /* Products */ = {
47+
isa = PBXGroup;
48+
children = (
49+
EF4FEA771EFFC104003CDCD2 /* HelloWorld.app */,
50+
);
51+
name = Products;
52+
sourceTree = "<group>";
53+
};
54+
EF4FEA791EFFC104003CDCD2 /* HelloWorld */ = {
55+
isa = PBXGroup;
56+
children = (
57+
EF4FEA7A1EFFC104003CDCD2 /* AppDelegate.swift */,
58+
EF4FEA7C1EFFC104003CDCD2 /* ViewController.swift */,
59+
EF4FEA7E1EFFC104003CDCD2 /* Main.storyboard */,
60+
EF4FEA811EFFC104003CDCD2 /* Assets.xcassets */,
61+
EF4FEA831EFFC104003CDCD2 /* LaunchScreen.storyboard */,
62+
EF4FEA861EFFC104003CDCD2 /* Info.plist */,
63+
);
64+
path = HelloWorld;
65+
sourceTree = "<group>";
66+
};
67+
/* End PBXGroup section */
68+
69+
/* Begin PBXNativeTarget section */
70+
EF4FEA761EFFC104003CDCD2 /* HelloWorld */ = {
71+
isa = PBXNativeTarget;
72+
buildConfigurationList = EF4FEA891EFFC104003CDCD2 /* Build configuration list for PBXNativeTarget "HelloWorld" */;
73+
buildPhases = (
74+
EF4FEA731EFFC104003CDCD2 /* Sources */,
75+
EF4FEA741EFFC104003CDCD2 /* Frameworks */,
76+
EF4FEA751EFFC104003CDCD2 /* Resources */,
77+
);
78+
buildRules = (
79+
);
80+
dependencies = (
81+
);
82+
name = HelloWorld;
83+
productName = HelloWorld;
84+
productReference = EF4FEA771EFFC104003CDCD2 /* HelloWorld.app */;
85+
productType = "com.apple.product-type.application";
86+
};
87+
/* End PBXNativeTarget section */
88+
89+
/* Begin PBXProject section */
90+
EF4FEA6F1EFFC104003CDCD2 /* Project object */ = {
91+
isa = PBXProject;
92+
attributes = {
93+
LastSwiftUpdateCheck = 0830;
94+
LastUpgradeCheck = 0830;
95+
ORGANIZATIONNAME = andyron;
96+
TargetAttributes = {
97+
EF4FEA761EFFC104003CDCD2 = {
98+
CreatedOnToolsVersion = 8.3.3;
99+
DevelopmentTeam = ZHNA975N38;
100+
ProvisioningStyle = Automatic;
101+
};
102+
};
103+
};
104+
buildConfigurationList = EF4FEA721EFFC104003CDCD2 /* Build configuration list for PBXProject "HelloWorld" */;
105+
compatibilityVersion = "Xcode 3.2";
106+
developmentRegion = English;
107+
hasScannedForEncodings = 0;
108+
knownRegions = (
109+
en,
110+
Base,
111+
);
112+
mainGroup = EF4FEA6E1EFFC104003CDCD2;
113+
productRefGroup = EF4FEA781EFFC104003CDCD2 /* Products */;
114+
projectDirPath = "";
115+
projectRoot = "";
116+
targets = (
117+
EF4FEA761EFFC104003CDCD2 /* HelloWorld */,
118+
);
119+
};
120+
/* End PBXProject section */
121+
122+
/* Begin PBXResourcesBuildPhase section */
123+
EF4FEA751EFFC104003CDCD2 /* Resources */ = {
124+
isa = PBXResourcesBuildPhase;
125+
buildActionMask = 2147483647;
126+
files = (
127+
EF4FEA851EFFC104003CDCD2 /* LaunchScreen.storyboard in Resources */,
128+
EF4FEA821EFFC104003CDCD2 /* Assets.xcassets in Resources */,
129+
EF4FEA801EFFC104003CDCD2 /* Main.storyboard in Resources */,
130+
);
131+
runOnlyForDeploymentPostprocessing = 0;
132+
};
133+
/* End PBXResourcesBuildPhase section */
134+
135+
/* Begin PBXSourcesBuildPhase section */
136+
EF4FEA731EFFC104003CDCD2 /* Sources */ = {
137+
isa = PBXSourcesBuildPhase;
138+
buildActionMask = 2147483647;
139+
files = (
140+
EF4FEA7D1EFFC104003CDCD2 /* ViewController.swift in Sources */,
141+
EF4FEA7B1EFFC104003CDCD2 /* AppDelegate.swift in Sources */,
142+
);
143+
runOnlyForDeploymentPostprocessing = 0;
144+
};
145+
/* End PBXSourcesBuildPhase section */
146+
147+
/* Begin PBXVariantGroup section */
148+
EF4FEA7E1EFFC104003CDCD2 /* Main.storyboard */ = {
149+
isa = PBXVariantGroup;
150+
children = (
151+
EF4FEA7F1EFFC104003CDCD2 /* Base */,
152+
);
153+
name = Main.storyboard;
154+
sourceTree = "<group>";
155+
};
156+
EF4FEA831EFFC104003CDCD2 /* LaunchScreen.storyboard */ = {
157+
isa = PBXVariantGroup;
158+
children = (
159+
EF4FEA841EFFC104003CDCD2 /* Base */,
160+
);
161+
name = LaunchScreen.storyboard;
162+
sourceTree = "<group>";
163+
};
164+
/* End PBXVariantGroup section */
165+
166+
/* Begin XCBuildConfiguration section */
167+
EF4FEA871EFFC104003CDCD2 /* Debug */ = {
168+
isa = XCBuildConfiguration;
169+
buildSettings = {
170+
ALWAYS_SEARCH_USER_PATHS = NO;
171+
CLANG_ANALYZER_NONNULL = YES;
172+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
173+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
174+
CLANG_CXX_LIBRARY = "libc++";
175+
CLANG_ENABLE_MODULES = YES;
176+
CLANG_ENABLE_OBJC_ARC = YES;
177+
CLANG_WARN_BOOL_CONVERSION = YES;
178+
CLANG_WARN_CONSTANT_CONVERSION = YES;
179+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
180+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
181+
CLANG_WARN_EMPTY_BODY = YES;
182+
CLANG_WARN_ENUM_CONVERSION = YES;
183+
CLANG_WARN_INFINITE_RECURSION = YES;
184+
CLANG_WARN_INT_CONVERSION = YES;
185+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
186+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
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;
192+
ENABLE_STRICT_OBJC_MSGSEND = YES;
193+
ENABLE_TESTABILITY = YES;
194+
GCC_C_LANGUAGE_STANDARD = gnu99;
195+
GCC_DYNAMIC_NO_PIC = NO;
196+
GCC_NO_COMMON_BLOCKS = YES;
197+
GCC_OPTIMIZATION_LEVEL = 0;
198+
GCC_PREPROCESSOR_DEFINITIONS = (
199+
"DEBUG=1",
200+
"$(inherited)",
201+
);
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 = 10.3;
209+
MTL_ENABLE_DEBUG_INFO = YES;
210+
ONLY_ACTIVE_ARCH = YES;
211+
SDKROOT = iphoneos;
212+
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
213+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
214+
};
215+
name = Debug;
216+
};
217+
EF4FEA881EFFC104003CDCD2 /* Release */ = {
218+
isa = XCBuildConfiguration;
219+
buildSettings = {
220+
ALWAYS_SEARCH_USER_PATHS = NO;
221+
CLANG_ANALYZER_NONNULL = YES;
222+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
223+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
224+
CLANG_CXX_LIBRARY = "libc++";
225+
CLANG_ENABLE_MODULES = YES;
226+
CLANG_ENABLE_OBJC_ARC = YES;
227+
CLANG_WARN_BOOL_CONVERSION = YES;
228+
CLANG_WARN_CONSTANT_CONVERSION = YES;
229+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
230+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
231+
CLANG_WARN_EMPTY_BODY = YES;
232+
CLANG_WARN_ENUM_CONVERSION = YES;
233+
CLANG_WARN_INFINITE_RECURSION = YES;
234+
CLANG_WARN_INT_CONVERSION = YES;
235+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
236+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
237+
CLANG_WARN_UNREACHABLE_CODE = YES;
238+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
239+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
240+
COPY_PHASE_STRIP = NO;
241+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
242+
ENABLE_NS_ASSERTIONS = NO;
243+
ENABLE_STRICT_OBJC_MSGSEND = YES;
244+
GCC_C_LANGUAGE_STANDARD = gnu99;
245+
GCC_NO_COMMON_BLOCKS = YES;
246+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
247+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
248+
GCC_WARN_UNDECLARED_SELECTOR = YES;
249+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
250+
GCC_WARN_UNUSED_FUNCTION = YES;
251+
GCC_WARN_UNUSED_VARIABLE = YES;
252+
IPHONEOS_DEPLOYMENT_TARGET = 10.3;
253+
MTL_ENABLE_DEBUG_INFO = NO;
254+
SDKROOT = iphoneos;
255+
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
256+
VALIDATE_PRODUCT = YES;
257+
};
258+
name = Release;
259+
};
260+
EF4FEA8A1EFFC104003CDCD2 /* Debug */ = {
261+
isa = XCBuildConfiguration;
262+
buildSettings = {
263+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
264+
DEVELOPMENT_TEAM = ZHNA975N38;
265+
INFOPLIST_FILE = HelloWorld/Info.plist;
266+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
267+
PRODUCT_BUNDLE_IDENTIFIER = cn.andyron.HelloWorld;
268+
PRODUCT_NAME = "$(TARGET_NAME)";
269+
SWIFT_VERSION = 3.0;
270+
};
271+
name = Debug;
272+
};
273+
EF4FEA8B1EFFC104003CDCD2 /* Release */ = {
274+
isa = XCBuildConfiguration;
275+
buildSettings = {
276+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
277+
DEVELOPMENT_TEAM = ZHNA975N38;
278+
INFOPLIST_FILE = HelloWorld/Info.plist;
279+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
280+
PRODUCT_BUNDLE_IDENTIFIER = cn.andyron.HelloWorld;
281+
PRODUCT_NAME = "$(TARGET_NAME)";
282+
SWIFT_VERSION = 3.0;
283+
};
284+
name = Release;
285+
};
286+
/* End XCBuildConfiguration section */
287+
288+
/* Begin XCConfigurationList section */
289+
EF4FEA721EFFC104003CDCD2 /* Build configuration list for PBXProject "HelloWorld" */ = {
290+
isa = XCConfigurationList;
291+
buildConfigurations = (
292+
EF4FEA871EFFC104003CDCD2 /* Debug */,
293+
EF4FEA881EFFC104003CDCD2 /* Release */,
294+
);
295+
defaultConfigurationIsVisible = 0;
296+
defaultConfigurationName = Release;
297+
};
298+
EF4FEA891EFFC104003CDCD2 /* Build configuration list for PBXNativeTarget "HelloWorld" */ = {
299+
isa = XCConfigurationList;
300+
buildConfigurations = (
301+
EF4FEA8A1EFFC104003CDCD2 /* Debug */,
302+
EF4FEA8B1EFFC104003CDCD2 /* Release */,
303+
);
304+
defaultConfigurationIsVisible = 0;
305+
};
306+
/* End XCConfigurationList section */
307+
};
308+
rootObject = EF4FEA6F1EFFC104003CDCD2 /* Project object */;
309+
}

3/HelloWorldAutoLayoutExercise/HelloWorld.xcodeproj/project.xcworkspace/contents.xcworkspacedata

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)