Skip to content

Commit 9a5bee7

Browse files
committed
Add AutoLayout
1 parent c9f60cd commit 9a5bee7

File tree

19 files changed

+1043
-1
lines changed

19 files changed

+1043
-1
lines changed
Lines changed: 298 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,298 @@
1+
// !$*UTF8*$!
2+
{
3+
archiveVersion = 1;
4+
classes = {
5+
};
6+
objectVersion = 47;
7+
objects = {
8+
9+
/* Begin PBXBuildFile section */
10+
5362E7F81C53F1B200DAA88B /* CenterAlignViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5362E7F71C53F1B200DAA88B /* CenterAlignViewController.swift */; };
11+
53D6A5F11C53BF5200A81A14 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6A5F01C53BF5200A81A14 /* AppDelegate.swift */; };
12+
53D6A5F31C53BF5200A81A14 /* MasterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D6A5F21C53BF5200A81A14 /* MasterViewController.swift */; };
13+
53D6A5F81C53BF5200A81A14 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A5F61C53BF5200A81A14 /* Main.storyboard */; };
14+
53D6A5FA1C53BF5200A81A14 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A5F91C53BF5200A81A14 /* Assets.xcassets */; };
15+
53D6A5FD1C53BF5200A81A14 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 53D6A5FB1C53BF5200A81A14 /* LaunchScreen.storyboard */; };
16+
/* End PBXBuildFile section */
17+
18+
/* Begin PBXFileReference section */
19+
5362E7F71C53F1B200DAA88B /* CenterAlignViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = CenterAlignViewController.swift; sourceTree = "<group>"; tabWidth = 4; };
20+
53D6A5ED1C53BF5200A81A14 /* AutoLayout.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AutoLayout.app; sourceTree = BUILT_PRODUCTS_DIR; };
21+
53D6A5F01C53BF5200A81A14 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
22+
53D6A5F21C53BF5200A81A14 /* MasterViewController.swift */ = {isa = PBXFileReference; indentWidth = 4; lastKnownFileType = sourcecode.swift; path = MasterViewController.swift; sourceTree = "<group>"; tabWidth = 4; };
23+
53D6A5F71C53BF5200A81A14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
24+
53D6A5F91C53BF5200A81A14 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
25+
53D6A5FC1C53BF5200A81A14 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
26+
53D6A5FE1C53BF5200A81A14 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
27+
/* End PBXFileReference section */
28+
29+
/* Begin PBXFrameworksBuildPhase section */
30+
53D6A5EA1C53BF5200A81A14 /* Frameworks */ = {
31+
isa = PBXFrameworksBuildPhase;
32+
buildActionMask = 2147483647;
33+
files = (
34+
);
35+
runOnlyForDeploymentPostprocessing = 0;
36+
};
37+
/* End PBXFrameworksBuildPhase section */
38+
39+
/* Begin PBXGroup section */
40+
53D6A5E41C53BF5200A81A14 = {
41+
isa = PBXGroup;
42+
children = (
43+
53D6A5EF1C53BF5200A81A14 /* AutoLayout */,
44+
53D6A5EE1C53BF5200A81A14 /* Products */,
45+
);
46+
sourceTree = "<group>";
47+
};
48+
53D6A5EE1C53BF5200A81A14 /* Products */ = {
49+
isa = PBXGroup;
50+
children = (
51+
53D6A5ED1C53BF5200A81A14 /* AutoLayout.app */,
52+
);
53+
name = Products;
54+
sourceTree = "<group>";
55+
};
56+
53D6A5EF1C53BF5200A81A14 /* AutoLayout */ = {
57+
isa = PBXGroup;
58+
children = (
59+
53D6A5F01C53BF5200A81A14 /* AppDelegate.swift */,
60+
53D6A5F21C53BF5200A81A14 /* MasterViewController.swift */,
61+
5362E7F71C53F1B200DAA88B /* CenterAlignViewController.swift */,
62+
53D6A5F61C53BF5200A81A14 /* Main.storyboard */,
63+
53D6A5F91C53BF5200A81A14 /* Assets.xcassets */,
64+
53D6A5FB1C53BF5200A81A14 /* LaunchScreen.storyboard */,
65+
53D6A5FE1C53BF5200A81A14 /* Info.plist */,
66+
);
67+
path = AutoLayout;
68+
sourceTree = "<group>";
69+
};
70+
/* End PBXGroup section */
71+
72+
/* Begin PBXNativeTarget section */
73+
53D6A5EC1C53BF5200A81A14 /* AutoLayout */ = {
74+
isa = PBXNativeTarget;
75+
buildConfigurationList = 53D6A6011C53BF5200A81A14 /* Build configuration list for PBXNativeTarget "AutoLayout" */;
76+
buildPhases = (
77+
53D6A5E91C53BF5200A81A14 /* Sources */,
78+
53D6A5EA1C53BF5200A81A14 /* Frameworks */,
79+
53D6A5EB1C53BF5200A81A14 /* Resources */,
80+
);
81+
buildRules = (
82+
);
83+
dependencies = (
84+
);
85+
name = AutoLayout;
86+
productName = AutoLayout;
87+
productReference = 53D6A5ED1C53BF5200A81A14 /* AutoLayout.app */;
88+
productType = "com.apple.product-type.application";
89+
};
90+
/* End PBXNativeTarget section */
91+
92+
/* Begin PBXProject section */
93+
53D6A5E51C53BF5200A81A14 /* Project object */ = {
94+
isa = PBXProject;
95+
attributes = {
96+
LastSwiftUpdateCheck = 0720;
97+
LastUpgradeCheck = 0720;
98+
ORGANIZATIONNAME = "Keith Harrison";
99+
TargetAttributes = {
100+
53D6A5EC1C53BF5200A81A14 = {
101+
CreatedOnToolsVersion = 7.2;
102+
};
103+
};
104+
};
105+
buildConfigurationList = 53D6A5E81C53BF5200A81A14 /* Build configuration list for PBXProject "AutoLayout" */;
106+
compatibilityVersion = "Xcode 6.3";
107+
developmentRegion = English;
108+
hasScannedForEncodings = 0;
109+
knownRegions = (
110+
en,
111+
Base,
112+
);
113+
mainGroup = 53D6A5E41C53BF5200A81A14;
114+
productRefGroup = 53D6A5EE1C53BF5200A81A14 /* Products */;
115+
projectDirPath = "";
116+
projectRoot = "";
117+
targets = (
118+
53D6A5EC1C53BF5200A81A14 /* AutoLayout */,
119+
);
120+
};
121+
/* End PBXProject section */
122+
123+
/* Begin PBXResourcesBuildPhase section */
124+
53D6A5EB1C53BF5200A81A14 /* Resources */ = {
125+
isa = PBXResourcesBuildPhase;
126+
buildActionMask = 2147483647;
127+
files = (
128+
53D6A5FD1C53BF5200A81A14 /* LaunchScreen.storyboard in Resources */,
129+
53D6A5FA1C53BF5200A81A14 /* Assets.xcassets in Resources */,
130+
53D6A5F81C53BF5200A81A14 /* Main.storyboard in Resources */,
131+
);
132+
runOnlyForDeploymentPostprocessing = 0;
133+
};
134+
/* End PBXResourcesBuildPhase section */
135+
136+
/* Begin PBXSourcesBuildPhase section */
137+
53D6A5E91C53BF5200A81A14 /* Sources */ = {
138+
isa = PBXSourcesBuildPhase;
139+
buildActionMask = 2147483647;
140+
files = (
141+
53D6A5F31C53BF5200A81A14 /* MasterViewController.swift in Sources */,
142+
5362E7F81C53F1B200DAA88B /* CenterAlignViewController.swift in Sources */,
143+
53D6A5F11C53BF5200A81A14 /* AppDelegate.swift in Sources */,
144+
);
145+
runOnlyForDeploymentPostprocessing = 0;
146+
};
147+
/* End PBXSourcesBuildPhase section */
148+
149+
/* Begin PBXVariantGroup section */
150+
53D6A5F61C53BF5200A81A14 /* Main.storyboard */ = {
151+
isa = PBXVariantGroup;
152+
children = (
153+
53D6A5F71C53BF5200A81A14 /* Base */,
154+
);
155+
name = Main.storyboard;
156+
sourceTree = "<group>";
157+
};
158+
53D6A5FB1C53BF5200A81A14 /* LaunchScreen.storyboard */ = {
159+
isa = PBXVariantGroup;
160+
children = (
161+
53D6A5FC1C53BF5200A81A14 /* Base */,
162+
);
163+
name = LaunchScreen.storyboard;
164+
sourceTree = "<group>";
165+
};
166+
/* End PBXVariantGroup section */
167+
168+
/* Begin XCBuildConfiguration section */
169+
53D6A5FF1C53BF5200A81A14 /* Debug */ = {
170+
isa = XCBuildConfiguration;
171+
buildSettings = {
172+
ALWAYS_SEARCH_USER_PATHS = NO;
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_EMPTY_BODY = YES;
181+
CLANG_WARN_ENUM_CONVERSION = YES;
182+
CLANG_WARN_INT_CONVERSION = YES;
183+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
184+
CLANG_WARN_UNREACHABLE_CODE = YES;
185+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
186+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
187+
COPY_PHASE_STRIP = NO;
188+
DEBUG_INFORMATION_FORMAT = dwarf;
189+
ENABLE_STRICT_OBJC_MSGSEND = YES;
190+
ENABLE_TESTABILITY = YES;
191+
GCC_C_LANGUAGE_STANDARD = gnu99;
192+
GCC_DYNAMIC_NO_PIC = NO;
193+
GCC_NO_COMMON_BLOCKS = YES;
194+
GCC_OPTIMIZATION_LEVEL = 0;
195+
GCC_PREPROCESSOR_DEFINITIONS = (
196+
"DEBUG=1",
197+
"$(inherited)",
198+
);
199+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
200+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
201+
GCC_WARN_UNDECLARED_SELECTOR = YES;
202+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
203+
GCC_WARN_UNUSED_FUNCTION = YES;
204+
GCC_WARN_UNUSED_VARIABLE = YES;
205+
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
206+
MTL_ENABLE_DEBUG_INFO = YES;
207+
ONLY_ACTIVE_ARCH = YES;
208+
SDKROOT = iphoneos;
209+
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
210+
TARGETED_DEVICE_FAMILY = "1,2";
211+
};
212+
name = Debug;
213+
};
214+
53D6A6001C53BF5200A81A14 /* Release */ = {
215+
isa = XCBuildConfiguration;
216+
buildSettings = {
217+
ALWAYS_SEARCH_USER_PATHS = NO;
218+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
219+
CLANG_CXX_LIBRARY = "libc++";
220+
CLANG_ENABLE_MODULES = YES;
221+
CLANG_ENABLE_OBJC_ARC = YES;
222+
CLANG_WARN_BOOL_CONVERSION = YES;
223+
CLANG_WARN_CONSTANT_CONVERSION = YES;
224+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
225+
CLANG_WARN_EMPTY_BODY = YES;
226+
CLANG_WARN_ENUM_CONVERSION = YES;
227+
CLANG_WARN_INT_CONVERSION = YES;
228+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
229+
CLANG_WARN_UNREACHABLE_CODE = YES;
230+
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
231+
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
232+
COPY_PHASE_STRIP = NO;
233+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
234+
ENABLE_NS_ASSERTIONS = NO;
235+
ENABLE_STRICT_OBJC_MSGSEND = YES;
236+
GCC_C_LANGUAGE_STANDARD = gnu99;
237+
GCC_NO_COMMON_BLOCKS = YES;
238+
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
239+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
240+
GCC_WARN_UNDECLARED_SELECTOR = YES;
241+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
242+
GCC_WARN_UNUSED_FUNCTION = YES;
243+
GCC_WARN_UNUSED_VARIABLE = YES;
244+
IPHONEOS_DEPLOYMENT_TARGET = 9.2;
245+
MTL_ENABLE_DEBUG_INFO = NO;
246+
SDKROOT = iphoneos;
247+
TARGETED_DEVICE_FAMILY = "1,2";
248+
VALIDATE_PRODUCT = YES;
249+
};
250+
name = Release;
251+
};
252+
53D6A6021C53BF5200A81A14 /* Debug */ = {
253+
isa = XCBuildConfiguration;
254+
buildSettings = {
255+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
256+
INFOPLIST_FILE = AutoLayout/Info.plist;
257+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
258+
PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.AutoLayout;
259+
PRODUCT_NAME = "$(TARGET_NAME)";
260+
};
261+
name = Debug;
262+
};
263+
53D6A6031C53BF5200A81A14 /* Release */ = {
264+
isa = XCBuildConfiguration;
265+
buildSettings = {
266+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
267+
INFOPLIST_FILE = AutoLayout/Info.plist;
268+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
269+
PRODUCT_BUNDLE_IDENTIFIER = com.useyourloaf.AutoLayout;
270+
PRODUCT_NAME = "$(TARGET_NAME)";
271+
};
272+
name = Release;
273+
};
274+
/* End XCBuildConfiguration section */
275+
276+
/* Begin XCConfigurationList section */
277+
53D6A5E81C53BF5200A81A14 /* Build configuration list for PBXProject "AutoLayout" */ = {
278+
isa = XCConfigurationList;
279+
buildConfigurations = (
280+
53D6A5FF1C53BF5200A81A14 /* Debug */,
281+
53D6A6001C53BF5200A81A14 /* Release */,
282+
);
283+
defaultConfigurationIsVisible = 0;
284+
defaultConfigurationName = Release;
285+
};
286+
53D6A6011C53BF5200A81A14 /* Build configuration list for PBXNativeTarget "AutoLayout" */ = {
287+
isa = XCConfigurationList;
288+
buildConfigurations = (
289+
53D6A6021C53BF5200A81A14 /* Debug */,
290+
53D6A6031C53BF5200A81A14 /* Release */,
291+
);
292+
defaultConfigurationIsVisible = 0;
293+
defaultConfigurationName = Release;
294+
};
295+
/* End XCConfigurationList section */
296+
};
297+
rootObject = 53D6A5E51C53BF5200A81A14 /* Project object */;
298+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
//
2+
// AppDelegate.swift
3+
// AutoLayout
4+
//
5+
// Created by Keith Harrison http://useyourloaf.com
6+
// Copyright (c) 2016 Keith Harrison. All rights reserved.
7+
//
8+
// Redistribution and use in source and binary forms, with or without
9+
// modification, are permitted provided that the following conditions are met:
10+
//
11+
// 1. Redistributions of source code must retain the above copyright
12+
// notice, this list of conditions and the following disclaimer.
13+
//
14+
// 2. Redistributions in binary form must reproduce the above copyright
15+
// notice, this list of conditions and the following disclaimer in the
16+
// documentation and/or other materials provided with the distribution.
17+
//
18+
// 3. Neither the name of the copyright holder nor the names of its
19+
// contributors may be used to endorse or promote products derived from
20+
// this software without specific prior written permission.
21+
//
22+
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23+
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24+
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25+
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
26+
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27+
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28+
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29+
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30+
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31+
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32+
// POSSIBILITY OF SUCH DAMAGE.
33+
34+
import UIKit
35+
36+
@UIApplicationMain
37+
class AppDelegate: UIResponder, UIApplicationDelegate, UISplitViewControllerDelegate {
38+
39+
var window: UIWindow?
40+
41+
42+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
43+
let splitViewController = self.window!.rootViewController as! UISplitViewController
44+
splitViewController.delegate = self
45+
return true
46+
}
47+
48+
func splitViewController(svc: UISplitViewController, shouldHideViewController vc: UIViewController, inOrientation orientation: UIInterfaceOrientation) -> Bool {
49+
return false
50+
}
51+
}
52+

0 commit comments

Comments
 (0)