Permalink
Browse files

status bar no longer disappears. photo edit view no longer has over l…

…apping nav bar. fixes #14
  • Loading branch information...
1 parent 0396591 commit 82f454a7dc58c2df775202a7b16c12c5d70fee73 @seanmcgary committed Apr 17, 2012
@@ -38,8 +38,7 @@ - (id) init
self.delegate = self;
self.locMgr = [[CLLocationManager alloc] init];
- self.locMgr.delegate = self;
-
+ self.locMgr.delegate = self;
}
@@ -128,6 +127,9 @@ - (void) imagePickerController:(UIImagePickerController *)picker didFinishPickin
[photoContainer setObject:image forKey:@"image"];
EditPhotoViewController *editPhoto = [[EditPhotoViewController alloc] initWithPhoto:photoContainer];
+ [[UIApplication sharedApplication] setStatusBarHidden:NO animated:NO];
+ [[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleDefault animated:YES];
+
[self pushViewController:editPhoto animated:YES];
}
@@ -122,24 +122,21 @@ - (void)viewDidLoad
int yOffset = 0;
+
+
if(self.navigationController.navigationBarHidden){
NSLog(@"navbar hidden");
[self.navigationController setNavigationBarHidden:NO animated:YES];
- //scrollView.frame.origin = CGPointMake(0, 50);
-
- yOffset = 30;
+ if([self.parentViewController isKindOfClass:[UIImagePickerController class]])
+ {
+ yOffset = 50;
+ }
}
- scrollView.frame = self.view.frame;
+ scrollView.frame = CGRectMake(self.view.frame.origin.x, yOffset, self.view.frame.size.width, self.view.frame.size.height);
- if(self.navigationController.toolbarHidden){
- NSLog(@"toolbar hidden");
- //yOffset = 0;
- }
-
- scrollView.frame = CGRectMake(0, yOffset, (self.view.frame.size.width), self.view.frame.size.height);
scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 700);
@@ -252,8 +249,6 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
-
- //[self.navigationController setNavigationBarHidden:YES animated:YES];
}
- (void) viewWillAppear:(BOOL)animated
@@ -262,9 +257,6 @@ - (void) viewWillAppear:(BOOL)animated
self.photoWithMetaData = [[NSMutableDictionary alloc] initWithDictionary:[AppHelper getPhotoDataForPhotoName:[self.photoWithMetaData objectForKey:@"photoName"]]];
- self.view.frame = [[UIScreen mainScreen] applicationFrame];
- self.scrollView.frame = self.view.frame;
-
}
- (IBAction)doneButtonPressed:(id)sender

0 comments on commit 82f454a

Please sign in to comment.