Skip to content
This repository
Browse code

Storyboard StackControler with RootView Object

  • Loading branch information...
commit e53883208471d31cee70432c531163985067ef2c 1 parent 5abc4ed
Franklin Webber authored March 26, 2012
4  ExampleStoryboard/PSStackedStoryboardExample.xcodeproj/project.pbxproj
@@ -23,6 +23,7 @@
23 23
 		E23C178915217A04007A3611 /* UIView+PSSizes.m in Sources */ = {isa = PBXBuildFile; fileRef = E23C178215217A04007A3611 /* UIView+PSSizes.m */; };
24 24
 		E23C178A15217A04007A3611 /* UIViewController+PSStackedView.m in Sources */ = {isa = PBXBuildFile; fileRef = E23C178415217A04007A3611 /* UIViewController+PSStackedView.m */; };
25 25
 		E23C178C15217A1C007A3611 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E23C178B15217A1C007A3611 /* QuartzCore.framework */; };
  26
+		E23C178E15217C34007A3611 /* PSViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E23C178D15217C34007A3611 /* PSViewController.xib */; };
26 27
 /* End PBXBuildFile section */
27 28
 
28 29
 /* Begin PBXFileReference section */
@@ -55,6 +56,7 @@
55 56
 		E23C178315217A04007A3611 /* UIViewController+PSStackedView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UIViewController+PSStackedView.h"; path = "../PSStackedView/UIViewController+PSStackedView.h"; sourceTree = "<group>"; };
56 57
 		E23C178415217A04007A3611 /* UIViewController+PSStackedView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UIViewController+PSStackedView.m"; path = "../PSStackedView/UIViewController+PSStackedView.m"; sourceTree = "<group>"; };
57 58
 		E23C178B15217A1C007A3611 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
  59
+		E23C178D15217C34007A3611 /* PSViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PSViewController.xib; sourceTree = "<group>"; };
58 60
 /* End PBXFileReference section */
59 61
 
60 62
 /* Begin PBXFrameworksBuildPhase section */
@@ -110,6 +112,7 @@
110 112
 				E23C176515217912007A3611 /* MainStoryboard_iPad.storyboard */,
111 113
 				E23C176815217912007A3611 /* PSViewController.h */,
112 114
 				E23C176915217912007A3611 /* PSViewController.m */,
  115
+				E23C178D15217C34007A3611 /* PSViewController.xib */,
113 116
 				E23C175715217912007A3611 /* Supporting Files */,
114 117
 			);
115 118
 			path = PSStackedStoryboardExample;
@@ -202,6 +205,7 @@
202 205
 				E23C175B15217912007A3611 /* InfoPlist.strings in Resources */,
203 206
 				E23C176415217912007A3611 /* MainStoryboard_iPhone.storyboard in Resources */,
204 207
 				E23C176715217912007A3611 /* MainStoryboard_iPad.storyboard in Resources */,
  208
+				E23C178E15217C34007A3611 /* PSViewController.xib in Resources */,
205 209
 			);
206 210
 			runOnlyForDeploymentPostprocessing = 0;
207 211
 		};
2  ExampleStoryboard/PSStackedStoryboardExample/PSViewController.h
@@ -6,7 +6,7 @@
6 6
 //  Copyright (c) 2012 University of Washington. All rights reserved.
7 7
 //
8 8
 
9  
-#import <UIKit/UIKit.h>
  9
+#import "PSStackedViewController.h"
10 10
 
11 11
 @interface PSViewController : UIViewController
12 12
 
21  ExampleStoryboard/PSStackedStoryboardExample/PSViewController.m
@@ -14,25 +14,4 @@ @interface PSViewController ()
14 14
 
15 15
 @implementation PSViewController
16 16
 
17  
-- (void)viewDidLoad
18  
-{
19  
-    [super viewDidLoad];
20  
-	// Do any additional setup after loading the view, typically from a nib.
21  
-}
22  
-
23  
-- (void)viewDidUnload
24  
-{
25  
-    [super viewDidUnload];
26  
-    // Release any retained subviews of the main view.
27  
-}
28  
-
29  
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
30  
-{
31  
-    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
32  
-        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
33  
-    } else {
34  
-        return YES;
35  
-    }
36  
-}
37  
-
38 17
 @end
166  ExampleStoryboard/PSStackedStoryboardExample/PSViewController.xib
... ...
@@ -0,0 +1,166 @@
  1
+<?xml version="1.0" encoding="UTF-8"?>
  2
+<archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
  3
+	<data>
  4
+		<int key="IBDocument.SystemTarget">1296</int>
  5
+		<string key="IBDocument.SystemVersion">11D50</string>
  6
+		<string key="IBDocument.InterfaceBuilderVersion">2182</string>
  7
+		<string key="IBDocument.AppKitVersion">1138.32</string>
  8
+		<string key="IBDocument.HIToolboxVersion">568.00</string>
  9
+		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
  10
+			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  11
+			<string key="NS.object.0">1181</string>
  12
+		</object>
  13
+		<array key="IBDocument.IntegratedClassDependencies">
  14
+			<string>IBProxyObject</string>
  15
+			<string>IBUIView</string>
  16
+			<string>IBUILabel</string>
  17
+		</array>
  18
+		<array key="IBDocument.PluginDependencies">
  19
+			<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  20
+		</array>
  21
+		<object class="NSMutableDictionary" key="IBDocument.Metadata">
  22
+			<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
  23
+			<integer value="1" key="NS.object.0"/>
  24
+		</object>
  25
+		<array class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
  26
+			<object class="IBProxyObject" id="372490531">
  27
+				<string key="IBProxiedObjectIdentifier">IBFilesOwner</string>
  28
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
  29
+			</object>
  30
+			<object class="IBProxyObject" id="975951072">
  31
+				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
  32
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
  33
+			</object>
  34
+			<object class="IBUIView" id="191373211">
  35
+				<reference key="NSNextResponder"/>
  36
+				<int key="NSvFlags">274</int>
  37
+				<array class="NSMutableArray" key="NSSubviews">
  38
+					<object class="IBUILabel" id="182569916">
  39
+						<reference key="NSNextResponder" ref="191373211"/>
  40
+						<int key="NSvFlags">292</int>
  41
+						<string key="NSFrame">{{129, 219}, {62, 21}}</string>
  42
+						<reference key="NSSuperview" ref="191373211"/>
  43
+						<reference key="NSWindow"/>
  44
+						<reference key="NSNextKeyView"/>
  45
+						<string key="NSReuseIdentifierKey">_NS:9</string>
  46
+						<bool key="IBUIOpaque">NO</bool>
  47
+						<bool key="IBUIClipsSubviews">YES</bool>
  48
+						<int key="IBUIContentMode">7</int>
  49
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
  50
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
  51
+						<string key="IBUIText">Stack it!</string>
  52
+						<object class="NSColor" key="IBUITextColor">
  53
+							<int key="NSColorSpace">1</int>
  54
+							<bytes key="NSRGB">MCAwIDAAA</bytes>
  55
+						</object>
  56
+						<nil key="IBUIHighlightedColor"/>
  57
+						<int key="IBUIBaselineAdjustment">0</int>
  58
+						<float key="IBUIMinimumFontSize">10</float>
  59
+						<object class="IBUIFontDescription" key="IBUIFontDescription">
  60
+							<int key="type">1</int>
  61
+							<double key="pointSize">17</double>
  62
+						</object>
  63
+						<object class="NSFont" key="IBUIFont">
  64
+							<string key="NSName">Helvetica</string>
  65
+							<double key="NSSize">17</double>
  66
+							<int key="NSfFlags">16</int>
  67
+						</object>
  68
+					</object>
  69
+				</array>
  70
+				<string key="NSFrame">{{0, 20}, {320, 460}}</string>
  71
+				<reference key="NSSuperview"/>
  72
+				<reference key="NSWindow"/>
  73
+				<reference key="NSNextKeyView" ref="182569916"/>
  74
+				<object class="NSColor" key="IBUIBackgroundColor">
  75
+					<int key="NSColorSpace">3</int>
  76
+					<bytes key="NSWhite">MQA</bytes>
  77
+					<object class="NSColorSpace" key="NSCustomColorSpace">
  78
+						<int key="NSID">2</int>
  79
+					</object>
  80
+				</object>
  81
+				<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
  82
+				<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
  83
+			</object>
  84
+		</array>
  85
+		<object class="IBObjectContainer" key="IBDocument.Objects">
  86
+			<array class="NSMutableArray" key="connectionRecords">
  87
+				<object class="IBConnectionRecord">
  88
+					<object class="IBCocoaTouchOutletConnection" key="connection">
  89
+						<string key="label">view</string>
  90
+						<reference key="source" ref="372490531"/>
  91
+						<reference key="destination" ref="191373211"/>
  92
+					</object>
  93
+					<int key="connectionID">4</int>
  94
+				</object>
  95
+			</array>
  96
+			<object class="IBMutableOrderedSet" key="objectRecords">
  97
+				<array key="orderedObjects">
  98
+					<object class="IBObjectRecord">
  99
+						<int key="objectID">0</int>
  100
+						<array key="object" id="0"/>
  101
+						<reference key="children" ref="1000"/>
  102
+						<nil key="parent"/>
  103
+					</object>
  104
+					<object class="IBObjectRecord">
  105
+						<int key="objectID">1</int>
  106
+						<reference key="object" ref="191373211"/>
  107
+						<array class="NSMutableArray" key="children">
  108
+							<reference ref="182569916"/>
  109
+						</array>
  110
+						<reference key="parent" ref="0"/>
  111
+					</object>
  112
+					<object class="IBObjectRecord">
  113
+						<int key="objectID">-1</int>
  114
+						<reference key="object" ref="372490531"/>
  115
+						<reference key="parent" ref="0"/>
  116
+						<string key="objectName">File's Owner</string>
  117
+					</object>
  118
+					<object class="IBObjectRecord">
  119
+						<int key="objectID">-2</int>
  120
+						<reference key="object" ref="975951072"/>
  121
+						<reference key="parent" ref="0"/>
  122
+					</object>
  123
+					<object class="IBObjectRecord">
  124
+						<int key="objectID">3</int>
  125
+						<reference key="object" ref="182569916"/>
  126
+						<reference key="parent" ref="191373211"/>
  127
+					</object>
  128
+				</array>
  129
+			</object>
  130
+			<dictionary class="NSMutableDictionary" key="flattenedProperties">
  131
+				<string key="-1.CustomClassName">PSViewController</string>
  132
+				<string key="-1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  133
+				<string key="-2.CustomClassName">UIResponder</string>
  134
+				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  135
+				<string key="1.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  136
+				<string key="3.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  137
+			</dictionary>
  138
+			<dictionary class="NSMutableDictionary" key="unlocalizedProperties"/>
  139
+			<nil key="activeLocalization"/>
  140
+			<dictionary class="NSMutableDictionary" key="localizations"/>
  141
+			<nil key="sourceID"/>
  142
+			<int key="maxID">4</int>
  143
+		</object>
  144
+		<object class="IBClassDescriber" key="IBDocument.Classes">
  145
+			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
  146
+				<object class="IBPartialClassDescription">
  147
+					<string key="className">PSViewController</string>
  148
+					<string key="superclassName">UIViewController</string>
  149
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
  150
+						<string key="majorKey">IBProjectSource</string>
  151
+						<string key="minorKey">./Classes/PSViewController.h</string>
  152
+					</object>
  153
+				</object>
  154
+			</array>
  155
+		</object>
  156
+		<int key="IBDocument.localizationMode">0</int>
  157
+		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
  158
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
  159
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
  160
+			<real value="1296" key="NS.object.0"/>
  161
+		</object>
  162
+		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
  163
+		<int key="IBDocument.defaultPropertyAccessControl">3</int>
  164
+		<string key="IBCocoaTouchPluginVersion">1181</string>
  165
+	</data>
  166
+</archive>
29  ExampleStoryboard/PSStackedStoryboardExample/en.lproj/MainStoryboard_iPhone.storyboard
... ...
@@ -1,24 +1,35 @@
1 1
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2  
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.0" toolsVersion="1906" systemVersion="11A511" targetRuntime="iOS.CocoaTouch" nextObjectID="6" propertyAccessControl="none" initialViewController="2">
  2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="1.1" toolsVersion="2182" systemVersion="11D50" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" initialViewController="2">
3 3
     <dependencies>
  4
+        <deployment defaultVersion="1296" identifier="iOS"/>
4 5
         <development defaultVersion="4200" identifier="xcode"/>
5  
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="902"/>
  6
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="1181"/>
6 7
     </dependencies>
7 8
     <scenes>
  9
+        <!--Stacked View Controller-->
8 10
         <scene sceneID="5">
9 11
             <objects>
10 12
                 <placeholder placeholderIdentifier="IBFirstResponder" id="4" sceneMemberID="firstResponder"/>
11  
-                <viewController id="2" customClass="PSViewController" sceneMemberID="viewController">
12  
-                    <view key="view" contentMode="scaleToFill" id="3">
13  
-                        <rect key="frame" x="0.0" y="20" width="320" height="460"/>
14  
-                        <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
15  
-                        <subviews/>
16  
-                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
17  
-                    </view>
  13
+                <viewController id="2" customClass="PSStackedViewController" sceneMemberID="viewController">
  14
+                    <connections>
  15
+                        <outlet property="rootViewController" destination="hla-rk-vUF" id="UIv-3W-oQV"/>
  16
+                    </connections>
18 17
                 </viewController>
  18
+                <customObject id="hla-rk-vUF" customClass="PSViewController"/>
19 19
             </objects>
20 20
         </scene>
21 21
     </scenes>
  22
+    <classes>
  23
+        <class className="PSStackedViewController" superclassName="UIViewController">
  24
+            <source key="sourceIdentifier" type="project" relativePath="./Classes/PSStackedViewController.h"/>
  25
+            <relationships>
  26
+                <relationship kind="outlet" name="rootViewController" candidateClass="UIViewController"/>
  27
+            </relationships>
  28
+        </class>
  29
+        <class className="PSViewController" superclassName="UIViewController">
  30
+            <source key="sourceIdentifier" type="project" relativePath="./Classes/PSViewController.h"/>
  31
+        </class>
  32
+    </classes>
22 33
     <simulatedMetricsContainer key="defaultSimulatedMetrics">
23 34
         <simulatedStatusBarMetrics key="statusBar"/>
24 35
         <simulatedOrientationMetrics key="orientation"/>

0 notes on commit e538832

Please sign in to comment.
Something went wrong with that request. Please try again.