Skip to content
This repository
Browse code

Fixed sizable example.

  • Loading branch information...
commit b32f921128daf2b3c942544ee597bb76f36a17d3 1 parent 27a0b90
Tom Adriaenssen authored March 26, 2012
7  SizableExample/SizableExample/ViewController.m
@@ -22,11 +22,11 @@ @implementation ViewController
22 22
 
23 23
 - (IBAction)zoomPressed:(id)sender {
24 24
     [UIView animateWithDuration:0.3 animations:^{
25  
-        if (self.containerView.frame.size.height == 320)
  25
+        CGRect cBounds = self.containerView.superview.bounds;
  26
+        if (self.containerView.frame.size.height != cBounds.size.height)
26 27
             self.containerView.frame = self.containerView.superview.bounds;
27 28
         else
28  
-            self.containerView.frame = (CGRect) { 0, 48, 320, 320 };
29  
-//        self.containerView.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.containerView.frame].CGPath;
  29
+            self.containerView.frame = (CGRect) { 0, 48, cBounds.size.width, cBounds.size.height - 48 - 48 };
30 30
     }];
31 31
 }
32 32
 
@@ -36,7 +36,6 @@ - (void)viewDidLoad
36 36
 {
37 37
     [super viewDidLoad];
38 38
     
39  
-//    self.containerView.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.containerView.bon].CGPath;
40 39
     self.containerView.layer.shadowColor = [UIColor blackColor].CGColor;
41 40
     self.containerView.layer.shadowOffset = CGSizeZero;
42 41
     self.containerView.layer.shadowRadius = 15;
78  SizableExample/SizableExample/en.lproj/ViewController.xib
... ...
@@ -1,14 +1,14 @@
1 1
 <?xml version="1.0" encoding="UTF-8"?>
2 2
 <archive type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="8.00">
3 3
 	<data>
4  
-		<int key="IBDocument.SystemTarget">1280</int>
5  
-		<string key="IBDocument.SystemVersion">11C74</string>
6  
-		<string key="IBDocument.InterfaceBuilderVersion">1938</string>
7  
-		<string key="IBDocument.AppKitVersion">1138.23</string>
8  
-		<string key="IBDocument.HIToolboxVersion">567.00</string>
  4
+		<int key="IBDocument.SystemTarget">1296</int>
  5
+		<string key="IBDocument.SystemVersion">11D50b</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 9
 		<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
10 10
 			<string key="NS.key.0">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
11  
-			<string key="NS.object.0">933</string>
  11
+			<string key="NS.object.0">1179</string>
12 12
 		</object>
13 13
 		<array key="IBDocument.IntegratedClassDependencies">
14 14
 			<string>IBUIBarButtonItem</string>
@@ -39,12 +39,13 @@
39 39
 				<array class="NSMutableArray" key="NSSubviews">
40 40
 					<object class="IBUIImageView" id="426862743">
41 41
 						<reference key="NSNextResponder" ref="774585933"/>
42  
-						<int key="NSvFlags">292</int>
  42
+						<int key="NSvFlags">274</int>
43 43
 						<string key="NSFrameSize">{320, 460}</string>
44 44
 						<reference key="NSSuperview" ref="774585933"/>
45 45
 						<reference key="NSWindow"/>
46  
-						<reference key="NSNextKeyView" ref="16256590"/>
  46
+						<reference key="NSNextKeyView" ref="835908301"/>
47 47
 						<string key="NSReuseIdentifierKey">_NS:567</string>
  48
+						<int key="IBUIContentMode">2</int>
48 49
 						<bool key="IBUIUserInteractionEnabled">NO</bool>
49 50
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
50 51
 						<object class="NSCustomResource" key="IBUIImage">
@@ -52,19 +53,36 @@
52 53
 							<string key="NSResourceName">carbon.png</string>
53 54
 						</object>
54 55
 					</object>
55  
-					<object class="IBUIView" id="16256590">
  56
+					<object class="IBUIView" id="835908301">
56 57
 						<reference key="NSNextResponder" ref="774585933"/>
57 58
 						<int key="NSvFlags">274</int>
58  
-						<string key="NSFrame">{{0, 48}, {320, 320}}</string>
  59
+						<array class="NSMutableArray" key="NSSubviews">
  60
+							<object class="IBUIView" id="16256590">
  61
+								<reference key="NSNextResponder" ref="835908301"/>
  62
+								<int key="NSvFlags">274</int>
  63
+								<string key="NSFrame">{{0, 48}, {320, 320}}</string>
  64
+								<reference key="NSSuperview" ref="835908301"/>
  65
+								<reference key="NSWindow"/>
  66
+								<reference key="NSNextKeyView" ref="956822305"/>
  67
+								<string key="NSReuseIdentifierKey">_NS:196</string>
  68
+								<object class="NSColor" key="IBUIBackgroundColor">
  69
+									<int key="NSColorSpace">1</int>
  70
+									<bytes key="NSRGB">MSAxIDAAA</bytes>
  71
+								</object>
  72
+								<bool key="IBUIClipsSubviews">YES</bool>
  73
+								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
  74
+							</object>
  75
+						</array>
  76
+						<string key="NSFrameSize">{320, 416}</string>
59 77
 						<reference key="NSSuperview" ref="774585933"/>
60 78
 						<reference key="NSWindow"/>
61  
-						<reference key="NSNextKeyView" ref="956822305"/>
62  
-						<string key="NSReuseIdentifierKey">_NS:196</string>
  79
+						<reference key="NSNextKeyView" ref="16256590"/>
  80
+						<string key="NSReuseIdentifierKey">_NS:9</string>
63 81
 						<object class="NSColor" key="IBUIBackgroundColor">
64  
-							<int key="NSColorSpace">1</int>
65  
-							<bytes key="NSRGB">MSAxIDAAA</bytes>
  82
+							<int key="NSColorSpace">3</int>
  83
+							<bytes key="NSWhite">MCAwAA</bytes>
66 84
 						</object>
67  
-						<bool key="IBUIClipsSubviews">YES</bool>
  85
+						<bool key="IBUIOpaque">NO</bool>
68 86
 						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
69 87
 					</object>
70 88
 					<object class="IBUIToolbar" id="956822305">
@@ -73,6 +91,7 @@
73 91
 						<string key="NSFrame">{{0, 416}, {320, 44}}</string>
74 92
 						<reference key="NSSuperview" ref="774585933"/>
75 93
 						<reference key="NSWindow"/>
  94
+						<reference key="NSNextKeyView"/>
76 95
 						<string key="NSReuseIdentifierKey">_NS:371</string>
77 96
 						<bool key="IBUIOpaque">NO</bool>
78 97
 						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
@@ -154,18 +173,13 @@
154 173
 						<int key="objectID">6</int>
155 174
 						<reference key="object" ref="774585933"/>
156 175
 						<array class="NSMutableArray" key="children">
157  
-							<reference ref="16256590"/>
158 176
 							<reference ref="426862743"/>
159 177
 							<reference ref="956822305"/>
  178
+							<reference ref="835908301"/>
160 179
 						</array>
161 180
 						<reference key="parent" ref="0"/>
162 181
 					</object>
163 182
 					<object class="IBObjectRecord">
164  
-						<int key="objectID">8</int>
165  
-						<reference key="object" ref="16256590"/>
166  
-						<reference key="parent" ref="774585933"/>
167  
-					</object>
168  
-					<object class="IBObjectRecord">
169 183
 						<int key="objectID">9</int>
170 184
 						<reference key="object" ref="426862743"/>
171 185
 						<reference key="parent" ref="774585933"/>
@@ -183,6 +197,19 @@
183 197
 						<reference key="object" ref="612754432"/>
184 198
 						<reference key="parent" ref="956822305"/>
185 199
 					</object>
  200
+					<object class="IBObjectRecord">
  201
+						<int key="objectID">16</int>
  202
+						<reference key="object" ref="835908301"/>
  203
+						<array class="NSMutableArray" key="children">
  204
+							<reference ref="16256590"/>
  205
+						</array>
  206
+						<reference key="parent" ref="774585933"/>
  207
+					</object>
  208
+					<object class="IBObjectRecord">
  209
+						<int key="objectID">8</int>
  210
+						<reference key="object" ref="16256590"/>
  211
+						<reference key="parent" ref="835908301"/>
  212
+					</object>
186 213
 				</array>
187 214
 			</object>
188 215
 			<dictionary class="NSMutableDictionary" key="flattenedProperties">
@@ -192,6 +219,7 @@
192 219
 				<string key="-2.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
193 220
 				<string key="10.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
194 221
 				<string key="11.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
  222
+				<string key="16.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
195 223
 				<string key="6.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
196 224
 				<string key="8.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
197 225
 				<string key="9.IBPluginDependency">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -200,7 +228,7 @@
200 228
 			<nil key="activeLocalization"/>
201 229
 			<dictionary class="NSMutableDictionary" key="localizations"/>
202 230
 			<nil key="sourceID"/>
203  
-			<int key="maxID">13</int>
  231
+			<int key="maxID">16</int>
204 232
 		</object>
205 233
 		<object class="IBClassDescriber" key="IBDocument.Classes">
206 234
 			<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -238,12 +266,16 @@
238 266
 		</object>
239 267
 		<int key="IBDocument.localizationMode">0</int>
240 268
 		<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
  269
+		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDependencyDefaults">
  270
+			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>
  271
+			<real value="1296" key="NS.object.0"/>
  272
+		</object>
241 273
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
242 274
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
243 275
 		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
244 276
 			<string key="NS.key.0">carbon.png</string>
245 277
 			<string key="NS.object.0">{320, 416}</string>
246 278
 		</object>
247  
-		<string key="IBCocoaTouchPluginVersion">933</string>
  279
+		<string key="IBCocoaTouchPluginVersion">1179</string>
248 280
 	</data>
249 281
 </archive>

0 notes on commit b32f921

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