iOS 3.1 compatibility fixes 1.1.x
authorstefan
Mon, 29 Nov 2010 23:56:50 -0500
branch1.1.x
changeset 309 0f82806a826cbb297910aad225d5fdaa1c6bb57e
parent 308 c81b1239ea14c0bd7e8e0c182aa6f00a5105b417
child 310 a238b3cb3d3e6504ba3bd1dccaaf71b8a1a83d3c
push id164
push userstefan@arentz.ca
push dateTue, 30 Nov 2010 04:56:58 +0000
iOS 3.1 compatibility fixes
Sources/English.lproj/ManualSetupViewController.xib
Sources/UserInterface/ManualSetupViewController.m
--- a/Sources/English.lproj/ManualSetupViewController.xib
+++ b/Sources/English.lproj/ManualSetupViewController.xib
@@ -62,16 +62,28 @@
 									<int key="IBUIStyle">2</int>
 									<reference key="IBUINavigationItem" ref="1062381085"/>
 									<int key="IBUISystemItemIdentifier">1</int>
 								</object>
 								<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
 							</object>
 						</object>
 					</object>
+					<object class="IBUIImageView" id="286429146">
+						<reference key="NSNextResponder" ref="191373211"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{0, 44}, {320, 416}}</string>
+						<reference key="NSSuperview" ref="191373211"/>
+						<bool key="IBUIUserInteractionEnabled">NO</bool>
+						<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
+						<object class="NSCustomResource" key="IBUIImage">
+							<string key="NSClassName">NSImage</string>
+							<string key="NSResourceName">Background.png</string>
+						</object>
+					</object>
 					<object class="IBUITableView" id="906392835">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">274</int>
 						<string key="NSFrame">{{0, 44}, {320, 416}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
 						<object class="NSColor" key="IBUIBackgroundColor">
 							<int key="NSColorSpace">10</int>
 							<object class="NSImage" key="NSImage">
@@ -245,16 +257,17 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 					<object class="IBObjectRecord">
 						<int key="objectID">1</int>
 						<reference key="object" ref="191373211"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<reference ref="368557611"/>
 							<reference ref="906392835"/>
 							<reference ref="971506953"/>
+							<reference ref="286429146"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">-1</int>
 						<reference key="object" ref="372490531"/>
 						<reference key="parent" ref="0"/>
 						<string key="objectName">File's Owner</string>
@@ -311,16 +324,21 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 						<reference key="object" ref="421087335"/>
 						<reference key="parent" ref="971506953"/>
 					</object>
 					<object class="IBObjectRecord">
 						<int key="objectID">32</int>
 						<reference key="object" ref="812193395"/>
 						<reference key="parent" ref="1062381085"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">34</int>
+						<reference key="object" ref="286429146"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="NSArray" key="dict.sortedKeys">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>-1.CustomClassName</string>
 					<string>-2.CustomClassName</string>
@@ -330,25 +348,26 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 					<string>20.IBPluginDependency</string>
 					<string>20.IBViewBoundsToFrameTransform</string>
 					<string>21.IBPluginDependency</string>
 					<string>22.IBPluginDependency</string>
 					<string>22.IBViewBoundsToFrameTransform</string>
 					<string>25.IBPluginDependency</string>
 					<string>25.IBViewBoundsToFrameTransform</string>
 					<string>32.IBPluginDependency</string>
+					<string>34.IBPluginDependency</string>
 					<string>5.IBPluginDependency</string>
 					<string>5.IBViewBoundsToFrameTransform</string>
 					<string>6.IBPluginDependency</string>
 				</object>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 					<string>ManualSetupViewController</string>
 					<string>UIResponder</string>
-					<string>{{364, 104}, {320, 480}}</string>
+					<string>{{1493, 830}, {320, 480}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>{{68, 340}, {320, 460}}</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<object class="NSAffineTransform">
 						<bytes key="NSTransformStruct">P4AAAL+AAADCkAAAxBmAAA</bytes>
 					</object>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -356,16 +375,17 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 						<bytes key="NSTransformStruct">AUMOAABDEwAAA</bytes>
 					</object>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<object class="NSAffineTransform">
 						<bytes key="NSTransformStruct">P4AAAL+AAAAAAAAAw4gAAA</bytes>
 					</object>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<object class="NSAffineTransform">
 						<bytes key="NSTransformStruct">P4AAAL+AAADC2gAAwmQAAA</bytes>
 					</object>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="unlocalizedProperties">
 				<bool key="EncodedWithXMLCoder">YES</bool>
@@ -378,17 +398,17 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 			<object class="NSMutableDictionary" key="localizations">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<reference key="dict.sortedKeys" ref="0"/>
 				<object class="NSMutableArray" key="dict.values">
 					<bool key="EncodedWithXMLCoder">YES</bool>
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">33</int>
+			<int key="maxID">34</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
 				<bool key="EncodedWithXMLCoder">YES</bool>
 				<object class="IBPartialClassDescription">
 					<string key="className">ManualSetupViewController</string>
 					<string key="superclassName">UIViewController</string>
 					<object class="NSMutableDictionary" key="actions">
@@ -530,14 +550,23 @@ AAMAAAABAAEAAAFTAAMAAAAEAAACAgAAAAAACAAI
 		<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
 			<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>
 			<integer value="3000" key="NS.object.0"/>
 		</object>
 		<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
 		<string key="IBDocument.LastKnownRelativeProjectPath">../Weave.xcodeproj</string>
 		<int key="IBDocument.defaultPropertyAccessControl">3</int>
 		<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
-			<string key="NS.key.0">SpinnerBackground.png</string>
-			<string key="NS.object.0">{80, 80}</string>
+			<bool key="EncodedWithXMLCoder">YES</bool>
+			<object class="NSArray" key="dict.sortedKeys">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>Background.png</string>
+				<string>SpinnerBackground.png</string>
+			</object>
+			<object class="NSMutableArray" key="dict.values">
+				<bool key="EncodedWithXMLCoder">YES</bool>
+				<string>{320, 480}</string>
+				<string>{80, 80}</string>
+			</object>
 		</object>
 		<string key="IBCocoaTouchPluginVersion">132</string>
 	</data>
 </archive>
--- a/Sources/UserInterface/ManualSetupViewController.m
+++ b/Sources/UserInterface/ManualSetupViewController.m
@@ -146,17 +146,17 @@
 }
 
 #pragma mark -
 
 - (void) keyboardDidShow: (NSNotification*) notification
 {
 	CGFloat keyboardHeight = 216;
 
-	NSValue* value = [[notification userInfo] objectForKey: UIKeyboardFrameEndUserInfoKey];
+	NSValue* value = [[notification userInfo] objectForKey: UIKeyboardBoundsUserInfoKey];
 	if (value != nil) {
 		CGRect frameEnd;
 		[value getValue: &frameEnd];
 		keyboardHeight = frameEnd.size.height;
 	}
 
 	CGRect frame = self.tableView.frame;
 	frame.size.height -= keyboardHeight;
@@ -167,17 +167,17 @@
 			atScrollPosition: UITableViewScrollPositionNone animated: YES];
 	}
 }
 
 - (void) keyboardDidHide: (NSNotification*) notification
 {
 	CGFloat keyboardHeight = 216;
 
-	NSValue* value = [[notification userInfo] objectForKey: UIKeyboardFrameBeginUserInfoKey];
+	NSValue* value = [[notification userInfo] objectForKey: UIKeyboardBoundsUserInfoKey];
 	if (value != nil) {
 		CGRect frameBegin;
 		[value getValue: &frameBegin];
 		keyboardHeight = frameBegin.size.height;
 	}
 
 	CGRect frame = self.tableView.frame;
 	frame.size.height += keyboardHeight;
@@ -186,17 +186,18 @@
 
 #pragma mark -
 
 - (void) viewDidLoad
 {
 	[super viewDidLoad];
 	
 	_tableView.allowsSelection = NO;
-	_tableView.backgroundView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"Background.png"]] autorelease];
+	//_tableView.backgroundView = [[[UIImageView alloc] initWithImage: [UIImage imageNamed: @"Background.png"]] autorelease];
+	_tableView.backgroundColor = [UIColor clearColor];
 }
 
 - (void) viewDidAppear:(BOOL)animated
 {
 	[[NSNotificationCenter defaultCenter] addObserver:self selector: @selector(keyboardDidShow:)
 		name:UIKeyboardDidShowNotification object:nil];
 		
 	[[NSNotificationCenter defaultCenter] addObserver:self selector: @selector(keyboardDidHide:)
@@ -266,18 +267,16 @@
 	if (textField == [self customServerTextField]) {
 		[_customServerURL release];
 		_customServerURL = [textField.text copy];
 	}
 }
 
 - (BOOL) textFieldShouldReturn: (UITextField*) textField 
 {
-	NSLog(@"textFieldShouldReturn: %@", textField);
-
 	// Update the data model
 
 	if (textField == [self usernameTextField]) {
 		[_username release];
 		_username = [textField.text copy];
 	}
 	
 	if (textField == [self passwordTextField]) {