adds a "factory reset" to iphone frontend
authorkoda
Wed, 27 Jan 2010 19:58:52 +0000
changeset 2720 a5111ec4d25f
parent 2719 0efcaa69d30c
child 2721 87067dcc208b
adds a "factory reset" to iphone frontend
cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m
cocoaTouch/SettingsViewController.h
cocoaTouch/SettingsViewController.m
cocoaTouch/SettingsViewController.xib
--- a/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Wed Jan 27 00:11:52 2010 +0000
+++ b/cocoaTouch/SDLOverrides/SDL_uikitappdelegate.m	Wed Jan 27 19:58:52 2010 +0000
@@ -137,13 +137,14 @@
 
 -(void) applicationDidReceiveMemoryWarning:(UIApplication *)application {
 	UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Running low on memory"
-							message:@"Will try to free some memory but app may crash"
+							message:@"I will try to free some memory but game might slow down a little"
 						       delegate:nil
 					      cancelButtonTitle:@"Ok"
 					      otherButtonTitles:nil ];
 	[alert show];
 	[alert release];
 }
+
 #pragma mark -
 #pragma mark SDLUIKitDelegate methods
 // override the direct execution of SDL_main to allow us to implement the frontend (even using a nib)
@@ -151,6 +152,7 @@
 	[application setStatusBarHidden:YES animated:NO];
 
 	[self checkFirstRun];
+	
 	/* Set working directory to resource path */
 	[[NSFileManager defaultManager] changeCurrentDirectoryPath: [[NSBundle mainBundle] resourcePath]];
 
--- a/cocoaTouch/SettingsViewController.h	Wed Jan 27 00:11:52 2010 +0000
+++ b/cocoaTouch/SettingsViewController.h	Wed Jan 27 19:58:52 2010 +0000
@@ -9,7 +9,8 @@
 #import <UIKit/UIKit.h>
 
 
-@interface SettingsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
+@interface SettingsViewController : UIViewController 
+		<UITableViewDelegate, UITableViewDataSource, UIActionSheetDelegate> {
 	UITextField *username;
 	UITextField *password;
 	UISwitch *musicSwitch;
@@ -19,7 +20,10 @@
 	UILabel *volumeLabel;
 	UITableView *table;
 	UITableViewCell *volumeCell;
+	UIView *buttonContainer;
+	BOOL needsReset;
 }
+
 @property (nonatomic, retain) IBOutlet UITextField *username;
 @property (nonatomic, retain) IBOutlet UITextField *password;
 @property (nonatomic, retain) UISwitch *musicSwitch;
@@ -29,8 +33,10 @@
 @property (nonatomic, retain) IBOutlet UILabel *volumeLabel;
 @property (nonatomic, retain) IBOutlet UITableView *table;
 @property (nonatomic, retain) IBOutlet UITableViewCell *volumeCell;
+@property (nonatomic, retain) IBOutlet UIView *buttonContainer;
 
 -(IBAction) sliderChanged: (id)sender;
 -(IBAction) backgroundTap: (id)sender;
 -(IBAction) textFieldDoneEditing: (id)sender;
+-(IBAction) deleteData: (id)sender;
 @end
--- a/cocoaTouch/SettingsViewController.m	Wed Jan 27 00:11:52 2010 +0000
+++ b/cocoaTouch/SettingsViewController.m	Wed Jan 27 19:58:52 2010 +0000
@@ -11,7 +11,8 @@
 
 @implementation SettingsViewController
 
-@synthesize username, password, musicSwitch, soundsSwitch, altDamageSwitch, volumeSlider, volumeLabel, table, volumeCell;
+@synthesize username, password, musicSwitch, soundsSwitch, altDamageSwitch, 
+	    volumeSlider, volumeLabel, table, volumeCell, buttonContainer;
 
 
 -(void) loadView {
@@ -27,6 +28,7 @@
 -(void) viewDidLoad {
 	NSString *filePath = [[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"];
 	
+	needsReset = NO;
 	if ([[NSFileManager defaultManager] fileExistsAtPath:filePath]) {	
 		NSMutableDictionary *data = [[NSMutableDictionary alloc] initWithContentsOfFile:filePath];
 		username.text = [data objectForKey:@"username"];
@@ -62,6 +64,9 @@
 	volumeLabel.textColor = [UIColor grayColor];
 	table.backgroundColor = [UIColor clearColor];
 	table.allowsSelection = NO;
+	buttonContainer.backgroundColor = [UIColor clearColor];
+	table.tableFooterView = buttonContainer;
+	
 	[super viewDidLoad];
 }
 
@@ -75,25 +80,28 @@
 	self.volumeSlider = nil;
 	self.table = nil;
 	self.volumeCell = nil;
+	self.buttonContainer = nil;
 	[super viewDidUnload];
 }
 
 //- (void)applicationWillTerminate:(NSNotification *)notification {
 -(void) viewWillDisappear:(BOOL)animated {
-	NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
-	NSString *tmpMus = (musicSwitch.on) ? @"1" : @"0";
-	NSString *tmpEff = (soundsSwitch.on) ? @"1" : @"0";
-	NSString *tmpAlt = (altDamageSwitch.on) ? @"1" : @"0";
-	
-	[saveDict setObject:username.text forKey:@"username"];
-	[saveDict setObject:password.text forKey:@"password"];
-	[saveDict setObject:tmpMus forKey:@"music"];
-	[saveDict setObject:tmpEff forKey:@"sounds"];
-	[saveDict setObject:tmpAlt forKey:@"alternate"];
-	[saveDict setObject:volumeLabel.text forKey:@"volume"];
-	
-	[saveDict writeToFile:[[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"] atomically:YES];
-	[saveDict release];
+	if (!needsReset) {
+		NSMutableDictionary *saveDict = [[NSMutableDictionary alloc] init];
+		NSString *tmpMus = (musicSwitch.on) ? @"1" : @"0";
+		NSString *tmpEff = (soundsSwitch.on) ? @"1" : @"0";
+		NSString *tmpAlt = (altDamageSwitch.on) ? @"1" : @"0";
+		
+		[saveDict setObject:username.text forKey:@"username"];
+		[saveDict setObject:password.text forKey:@"password"];
+		[saveDict setObject:tmpMus forKey:@"music"];
+		[saveDict setObject:tmpEff forKey:@"sounds"];
+		[saveDict setObject:tmpAlt forKey:@"alternate"];
+		[saveDict setObject:volumeLabel.text forKey:@"volume"];
+		
+		[saveDict writeToFile:[[SDLUIKitDelegate sharedAppDelegate] dataFilePath:@"settings.plist"] atomically:YES];
+		[saveDict release];
+	}
 	[super viewWillDisappear:animated];
 }
 
@@ -107,6 +115,7 @@
 	[volumeSlider release];
 	[table release];
 	[volumeCell release];
+	[buttonContainer release];
 	[super dealloc];
 }
 /*
@@ -152,6 +161,47 @@
 }
 
 #pragma mark -
+#pragma mark UIActionSheet Methods
+-(IBAction) deleteData: (id)sender {
+	UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"Are you reeeeeally sure?"
+								 delegate:self
+							cancelButtonTitle:@"Well, maybe not..."
+						   destructiveButtonTitle:@"Sure, let's start over"
+							otherButtonTitles:nil];
+	[actionSheet showInView:self.view];
+	[actionSheet release];
+}
+
+-(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
+	if ([actionSheet cancelButtonIndex] != buttonIndex) {
+		needsReset = YES;
+		
+		// get the document dirctory
+		NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
+		NSString *documentsDirectory = [paths objectAtIndex:0];
+		
+		// get the content of the directory
+		NSFileManager *fm = [NSFileManager defaultManager];
+		NSArray *dirContent = [fm directoryContentsAtPath:documentsDirectory];
+		NSError *error;
+		
+		// delete data
+		for (NSString *fileName in dirContent) {
+			[fm removeItemAtPath:[documentsDirectory stringByAppendingPathComponent:fileName] error:&error];
+		}
+		
+		// force resetting
+		UIAlertView *anAlert = [[UIAlertView alloc] initWithTitle:@"Hit Home Button to Exit" 
+								  message:@"\nEverything is gone!\nNow you need to restart the game..." 
+								 delegate:self
+							cancelButtonTitle:nil
+							otherButtonTitles:nil];
+		[anAlert show];
+		[anAlert release];
+	}
+}
+
+#pragma mark -
 #pragma mark TableView Methods
 #define kNetworkFields 0
 #define kAudioFields 1
@@ -247,7 +297,7 @@
 
 	switch (section) {
 		case kNetworkFields:
-			headerLabel.text = NSLocalizedString(@"Network Configuration", @"");
+			headerLabel.text = NSLocalizedString(@"Network Configuration", @"Network Configuration");
 			break;
 		case kAudioFields:
 			headerLabel.text = NSLocalizedString(@"Audio Preferences", @"");
@@ -273,8 +323,7 @@
 }
 
 -(CGFloat) tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
-	return 57;
+	return 57.0;
 }
 
-
 @end
--- a/cocoaTouch/SettingsViewController.xib	Wed Jan 27 00:11:52 2010 +0000
+++ b/cocoaTouch/SettingsViewController.xib	Wed Jan 27 19:58:52 2010 +0000
@@ -12,8 +12,6 @@
 		</object>
 		<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
 			<bool key="EncodedWithXMLCoder">YES</bool>
-			<integer value="37"/>
-			<integer value="1"/>
 		</object>
 		<object class="NSArray" key="IBDocument.PluginDependencies">
 			<bool key="EncodedWithXMLCoder">YES</bool>
@@ -36,8 +34,61 @@
 			<object class="IBProxyObject" id="975951072">
 				<string key="IBProxiedObjectIdentifier">IBFirstResponder</string>
 			</object>
+			<object class="IBUITextField" id="52230916">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<string key="NSFrame">{{100, 18}, {200, 31}}</string>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<int key="IBUIContentVerticalAlignment">0</int>
+				<string key="IBUIText"/>
+				<string key="IBUIPlaceholder">username</string>
+				<object class="NSColor" key="IBUITextColor">
+					<int key="NSColorSpace">1</int>
+					<bytes key="NSRGB">MC40MDAwMDAwMDYgMC40MDAwMDAwMDYgMQA</bytes>
+				</object>
+				<object class="NSFont" key="IBUIFont" id="788314749">
+					<string key="NSName">Helvetica</string>
+					<double key="NSSize">15</double>
+					<int key="NSfFlags">16</int>
+				</object>
+				<int key="IBUITextAlignment">2</int>
+				<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+				<float key="IBUIMinimumFontSize">17</float>
+				<object class="IBUITextInputTraits" key="IBUITextInputTraits">
+					<int key="IBUIAutocorrectionType">1</int>
+					<int key="IBUIReturnKeyType">9</int>
+				</object>
+			</object>
+			<object class="IBUITextField" id="809344278">
+				<nil key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<string key="NSFrame">{{100, 50}, {200, 31}}</string>
+				<bool key="IBUIOpaque">NO</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<int key="IBUIContentVerticalAlignment">0</int>
+				<string key="IBUIText"/>
+				<string key="IBUIPlaceholder">network password (if any)</string>
+				<object class="NSColor" key="IBUITextColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MAA</bytes>
+					<object class="NSColorSpace" key="NSCustomColorSpace" id="753158763">
+						<int key="NSID">2</int>
+					</object>
+				</object>
+				<reference key="IBUIFont" ref="788314749"/>
+				<int key="IBUITextAlignment">2</int>
+				<bool key="IBUIClearsOnBeginEditing">YES</bool>
+				<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
+				<float key="IBUIMinimumFontSize">17</float>
+				<object class="IBUITextInputTraits" key="IBUITextInputTraits">
+					<int key="IBUIAutocorrectionType">1</int>
+					<int key="IBUIReturnKeyType">9</int>
+					<bool key="IBUISecureTextEntry">YES</bool>
+				</object>
+			</object>
 			<object class="IBUIView" id="191373211">
-				<reference key="NSNextResponder"/>
+				<nil key="NSNextResponder"/>
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -54,65 +105,10 @@
 							<string key="NSResourceName">Background.png</string>
 						</object>
 					</object>
-					<object class="IBUITextField" id="52230916">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{100, 18}, {200, 31}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<string key="IBUIText"/>
-						<string key="IBUIPlaceholder">username</string>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">1</int>
-							<bytes key="NSRGB">MC40MDAwMDAwMDYgMC40MDAwMDAwMDYgMQA</bytes>
-						</object>
-						<object class="NSFont" key="IBUIFont" id="788314749">
-							<string key="NSName">Helvetica</string>
-							<double key="NSSize">15</double>
-							<int key="NSfFlags">16</int>
-						</object>
-						<int key="IBUITextAlignment">2</int>
-						<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
-						<float key="IBUIMinimumFontSize">17</float>
-						<object class="IBUITextInputTraits" key="IBUITextInputTraits">
-							<int key="IBUIAutocorrectionType">1</int>
-							<int key="IBUIReturnKeyType">9</int>
-						</object>
-					</object>
-					<object class="IBUITextField" id="809344278">
-						<reference key="NSNextResponder" ref="191373211"/>
-						<int key="NSvFlags">292</int>
-						<string key="NSFrame">{{100, 50}, {200, 31}}</string>
-						<reference key="NSSuperview" ref="191373211"/>
-						<bool key="IBUIOpaque">NO</bool>
-						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
-						<int key="IBUIContentVerticalAlignment">0</int>
-						<string key="IBUIText"/>
-						<string key="IBUIPlaceholder">network password (if any)</string>
-						<object class="NSColor" key="IBUITextColor">
-							<int key="NSColorSpace">3</int>
-							<bytes key="NSWhite">MAA</bytes>
-							<object class="NSColorSpace" key="NSCustomColorSpace">
-								<int key="NSID">2</int>
-							</object>
-						</object>
-						<reference key="IBUIFont" ref="788314749"/>
-						<int key="IBUITextAlignment">2</int>
-						<bool key="IBUIClearsOnBeginEditing">YES</bool>
-						<bool key="IBUIAdjustsFontSizeToFit">YES</bool>
-						<float key="IBUIMinimumFontSize">17</float>
-						<object class="IBUITextInputTraits" key="IBUITextInputTraits">
-							<int key="IBUIAutocorrectionType">1</int>
-							<int key="IBUIReturnKeyType">9</int>
-							<bool key="IBUISecureTextEntry">YES</bool>
-						</object>
-					</object>
 					<object class="IBUITableView" id="179734732">
 						<reference key="NSNextResponder" ref="191373211"/>
 						<int key="NSvFlags">274</int>
-						<string key="NSFrame">{{0, 98}, {320, 333}}</string>
+						<string key="NSFrame">{{0, 18}, {320, 393}}</string>
 						<reference key="NSSuperview" ref="191373211"/>
 						<bool key="IBUIOpaque">NO</bool>
 						<bool key="IBUIClipsSubviews">YES</bool>
@@ -129,15 +125,14 @@
 					</object>
 				</object>
 				<string key="NSFrameSize">{320, 431}</string>
-				<reference key="NSSuperview"/>
-				<object class="NSColor" key="IBUIBackgroundColor">
+				<object class="NSColor" key="IBUIBackgroundColor" id="458252179">
 					<int key="NSColorSpace">3</int>
 					<bytes key="NSWhite">MQA</bytes>
 				</object>
 				<object class="IBUISimulatedTabBarMetrics" key="IBUISimulatedBottomBarMetrics"/>
 			</object>
 			<object class="IBUITableViewCell" id="45589474">
-				<reference key="NSNextResponder"/>
+				<nil key="NSNextResponder"/>
 				<int key="NSvFlags">292</int>
 				<object class="NSMutableArray" key="NSSubviews">
 					<bool key="EncodedWithXMLCoder">YES</bool>
@@ -214,7 +209,6 @@
 					</object>
 				</object>
 				<string key="NSFrameSize">{320, 70}</string>
-				<reference key="NSSuperview"/>
 				<object class="NSColor" key="IBUIBackgroundColor">
 					<int key="NSColorSpace">1</int>
 					<bytes key="NSRGB">MSAxIDEAA</bytes>
@@ -223,6 +217,52 @@
 				<int key="IBUISeparatorStyle">1</int>
 				<reference key="IBUIContentView" ref="1008690992"/>
 			</object>
+			<object class="IBUIView" id="399248671">
+				<reference key="NSNextResponder"/>
+				<int key="NSvFlags">292</int>
+				<object class="NSMutableArray" key="NSSubviews">
+					<bool key="EncodedWithXMLCoder">YES</bool>
+					<object class="IBUIButton" id="227113826">
+						<reference key="NSNextResponder" ref="399248671"/>
+						<int key="NSvFlags">292</int>
+						<string key="NSFrame">{{20, 38}, {280, 50}}</string>
+						<reference key="NSSuperview" ref="399248671"/>
+						<reference key="NSWindow"/>
+						<bool key="IBUIOpaque">NO</bool>
+						<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+						<int key="IBUIContentHorizontalAlignment">0</int>
+						<int key="IBUIContentVerticalAlignment">0</int>
+						<object class="NSFont" key="IBUIFont">
+							<string key="NSName">Helvetica-Bold</string>
+							<double key="NSSize">15</double>
+							<int key="NSfFlags">16</int>
+						</object>
+						<int key="IBUIButtonType">1</int>
+						<string key="IBUINormalTitle">Erase All Data</string>
+						<reference key="IBUIHighlightedTitleColor" ref="458252179"/>
+						<object class="NSColor" key="IBUINormalTitleColor">
+							<int key="NSColorSpace">1</int>
+							<bytes key="NSRGB">MC4xOTYwNzg0MyAwLjMwOTgwMzkzIDAuNTIxNTY4NjYAA</bytes>
+						</object>
+						<object class="NSColor" key="IBUINormalTitleShadowColor">
+							<int key="NSColorSpace">3</int>
+							<bytes key="NSWhite">MC41AA</bytes>
+						</object>
+					</object>
+				</object>
+				<string key="NSFrameSize">{320, 100}</string>
+				<reference key="NSSuperview"/>
+				<reference key="NSWindow"/>
+				<object class="NSColor" key="IBUIBackgroundColor">
+					<int key="NSColorSpace">3</int>
+					<bytes key="NSWhite">MQA</bytes>
+					<reference key="NSCustomColorSpace" ref="753158763"/>
+				</object>
+				<bool key="IBUIAutoresizesSubviews">NO</bool>
+				<bool key="IBUIClipsSubviews">YES</bool>
+				<bool key="IBUIClearsContextBeforeDrawing">NO</bool>
+				<int key="IBUIContentMode">3</int>
+			</object>
 		</object>
 		<object class="IBObjectContainer" key="IBDocument.Objects">
 			<object class="NSMutableArray" key="connectionRecords">
@@ -344,6 +384,23 @@
 					</object>
 					<int key="connectionID">39</int>
 				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchEventConnection" key="connection">
+						<string key="label">deleteData:</string>
+						<reference key="source" ref="227113826"/>
+						<reference key="destination" ref="372490531"/>
+						<int key="IBEventType">7</int>
+					</object>
+					<int key="connectionID">42</int>
+				</object>
+				<object class="IBConnectionRecord">
+					<object class="IBCocoaTouchOutletConnection" key="connection">
+						<string key="label">buttonContainer</string>
+						<reference key="source" ref="372490531"/>
+						<reference key="destination" ref="399248671"/>
+					</object>
+					<int key="connectionID">46</int>
+				</object>
 			</object>
 			<object class="IBMutableOrderedSet" key="objectRecords">
 				<object class="NSArray" key="orderedObjects">
@@ -361,8 +418,6 @@
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<reference ref="411150667"/>
 							<reference ref="179734732"/>
-							<reference ref="809344278"/>
-							<reference ref="52230916"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
@@ -383,31 +438,13 @@
 						<reference key="parent" ref="191373211"/>
 					</object>
 					<object class="IBObjectRecord">
-						<int key="objectID">6</int>
-						<reference key="object" ref="809344278"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">30</int>
-						<reference key="object" ref="179734732"/>
-						<object class="NSMutableArray" key="children">
-							<bool key="EncodedWithXMLCoder">YES</bool>
-						</object>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
-						<int key="objectID">5</int>
-						<reference key="object" ref="52230916"/>
-						<reference key="parent" ref="191373211"/>
-					</object>
-					<object class="IBObjectRecord">
 						<int key="objectID">37</int>
 						<reference key="object" ref="45589474"/>
 						<object class="NSMutableArray" key="children">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<reference ref="1157528"/>
+							<reference ref="450734048"/>
 							<reference ref="891605917"/>
-							<reference ref="450734048"/>
 						</object>
 						<reference key="parent" ref="0"/>
 					</object>
@@ -426,6 +463,35 @@
 						<reference key="object" ref="891605917"/>
 						<reference key="parent" ref="45589474"/>
 					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">5</int>
+						<reference key="object" ref="52230916"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">30</int>
+						<reference key="object" ref="179734732"/>
+						<reference key="parent" ref="191373211"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">6</int>
+						<reference key="object" ref="809344278"/>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">44</int>
+						<reference key="object" ref="399248671"/>
+						<object class="NSMutableArray" key="children">
+							<bool key="EncodedWithXMLCoder">YES</bool>
+							<reference ref="227113826"/>
+						</object>
+						<reference key="parent" ref="0"/>
+					</object>
+					<object class="IBObjectRecord">
+						<int key="objectID">41</int>
+						<reference key="object" ref="227113826"/>
+						<reference key="parent" ref="399248671"/>
+					</object>
 				</object>
 			</object>
 			<object class="NSMutableDictionary" key="flattenedProperties">
@@ -443,6 +509,10 @@
 					<string>37.IBPluginDependency</string>
 					<string>38.IBPluginDependency</string>
 					<string>4.IBPluginDependency</string>
+					<string>41.IBEditorWindowLastContentRect</string>
+					<string>41.IBPluginDependency</string>
+					<string>44.IBEditorWindowLastContentRect</string>
+					<string>44.IBPluginDependency</string>
 					<string>5.IBPluginDependency</string>
 					<string>6.IBPluginDependency</string>
 					<string>7.IBPluginDependency</string>
@@ -460,6 +530,10 @@
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>{{1352, 334}, {220, 50}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
+					<string>{{734, 817}, {320, 100}}</string>
+					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
 					<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
@@ -481,7 +555,7 @@
 				</object>
 			</object>
 			<nil key="sourceID"/>
-			<int key="maxID">40</int>
+			<int key="maxID">46</int>
 		</object>
 		<object class="IBClassDescriber" key="IBDocument.Classes">
 			<object class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -494,6 +568,7 @@
 						<object class="NSArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
 							<string>backgroundTap:</string>
+							<string>deleteData:</string>
 							<string>sliderChanged:</string>
 							<string>textFieldDoneEditing:</string>
 						</object>
@@ -502,12 +577,14 @@
 							<string>id</string>
 							<string>id</string>
 							<string>id</string>
+							<string>id</string>
 						</object>
 					</object>
 					<object class="NSMutableDictionary" key="outlets">
 						<bool key="EncodedWithXMLCoder">YES</bool>
 						<object class="NSArray" key="dict.sortedKeys">
 							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>buttonContainer</string>
 							<string>password</string>
 							<string>table</string>
 							<string>username</string>
@@ -517,6 +594,7 @@
 						</object>
 						<object class="NSMutableArray" key="dict.values">
 							<bool key="EncodedWithXMLCoder">YES</bool>
+							<string>UIView</string>
 							<string>UITextField</string>
 							<string>UITableView</string>
 							<string>UITextField</string>
@@ -667,6 +745,14 @@
 					</object>
 				</object>
 				<object class="IBPartialClassDescription">
+					<string key="className">UIButton</string>
+					<string key="superclassName">UIControl</string>
+					<object class="IBClassDescriptionSource" key="sourceIdentifier">
+						<string key="majorKey">IBFrameworkSource</string>
+						<string key="minorKey">UIKit.framework/Headers/UIButton.h</string>
+					</object>
+				</object>
+				<object class="IBPartialClassDescription">
 					<string key="className">UIControl</string>
 					<string key="superclassName">UIView</string>
 					<object class="IBClassDescriptionSource" key="sourceIdentifier">