Skip to content

Commit

Permalink
status bar no longer disappears. photo edit view no longer has over l…
Browse files Browse the repository at this point in the history
…apping nav bar. fixes #14
  • Loading branch information
seanmcgary committed Apr 17, 2012
1 parent 0396591 commit 82f454a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
Binary file not shown.
6 changes: 4 additions & 2 deletions photohunt/CameraViewController.m
Expand Up @@ -38,8 +38,7 @@ - (id) init
self.delegate = self;

self.locMgr = [[CLLocationManager alloc] init];
self.locMgr.delegate = self;

self.locMgr.delegate = self;

}

Expand Down Expand Up @@ -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];
}

Expand Down
22 changes: 7 additions & 15 deletions photohunt/EditPhotoViewController.m
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 82f454a

Please sign in to comment.