cocoaTouch/SettingsViewController.m
changeset 2740 03df0573a9fd
parent 2723 eaa6ac1e95ea
child 2743 39d097ac2276
equal deleted inserted replaced
2739:f860f27028cc 2740:03df0573a9fd
   116 	[table release];
   116 	[table release];
   117 	[volumeCell release];
   117 	[volumeCell release];
   118 	[buttonContainer release];
   118 	[buttonContainer release];
   119 	[super dealloc];
   119 	[super dealloc];
   120 }
   120 }
   121 /*
   121 
   122 // Override to allow orientations other than the default portrait orientation.
   122 // Override to allow orientations other than the default portrait orientation.
   123 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
   123 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
   124     // Return YES for supported orientations
   124     // Return YES for supported orientations
   125     return (interfaceOrientation == UIInterfaceOrientationPortrait);
   125     return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
   126 }
   126 }
   127 */
   127 
   128 
   128 
   129 // makes the keyboard go away when background is tapped
   129 // makes the keyboard go away when background is tapped
   130 -(IBAction) backgroundTap: (id)sender {
   130 -(IBAction) backgroundTap: (id)sender {
   131 	[username resignFirstResponder];
   131 	[username resignFirstResponder];
   132 	[password resignFirstResponder];
   132 	[password resignFirstResponder];
   161 }
   161 }
   162 
   162 
   163 #pragma mark -
   163 #pragma mark -
   164 #pragma mark UIActionSheet Methods
   164 #pragma mark UIActionSheet Methods
   165 -(IBAction) deleteData: (id)sender {
   165 -(IBAction) deleteData: (id)sender {
       
   166 	/* temporary commented out
   166 	UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   167 	UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:NSLocalizedString(@"Are you reeeeeally sure?", @"")
   167 								 delegate:self
   168 								 delegate:self
   168 							cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   169 							cancelButtonTitle:NSLocalizedString(@"Well, maybe not...", @"")
   169 						   destructiveButtonTitle:NSLocalizedString(@"As sure as I can be!", @"")
   170 						   destructiveButtonTitle:NSLocalizedString(@"As sure as I can be!", @"")
   170 							otherButtonTitles:nil];
   171 							otherButtonTitles:nil];
   171 	[actionSheet showInView:self.view];
   172 	[actionSheet showInView:self.view];
   172 	[actionSheet release];
   173 	[actionSheet release];
       
   174 	 */
       
   175 	[UIView beginAnimations:@"Get Back" context:NULL];
       
   176 	[UIView setAnimationDuration:3];
       
   177 	[UIView setAnimationDuration:UIViewAnimationCurveEaseOut];
       
   178 	
       
   179 	self.view.frame = CGRectMake(0, -480, 480, 320);
       
   180 	[UIView commitAnimations];
       
   181 	
       
   182 	[self.view performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:2];
   173 }
   183 }
   174 
   184 
   175 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
   185 -(void) actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex {
   176 	if ([actionSheet cancelButtonIndex] != buttonIndex) {
   186 	if ([actionSheet cancelButtonIndex] != buttonIndex) {
   177 		needsReset = YES;
   187 		needsReset = YES;