4

I am making a full screen image view that is zoomable and scrollable similar to the one in Twitter for iPhone. I have it almost the same except I cant figure out how to use the real estate under the stats bar.

I start with a UINavigationController and push my image view. My image view is a UIView that contains a UIScrollView with a frame of (0, -44, 320, 480) to put it beneath the navigation bar, and a UIImageView on top of that with a frame of the scroll view's bounds.

I am hiding the navigation bar and status bar using:

[self.navigationController.navigationBar setAlpha:0.0f];
[[UIApplication sharedApplication] setStatusBarHidden:YES];

They hide correctly, but I am left with 20px of black at the top. I tried setting the scroll view's frame y-origin to -66, but that didn't help.

Any ideas?

lavoy
  • 1,876
  • 3
  • 21
  • 36

2 Answers2

0

Try this method to hide status bar

-(BOOL)prefersStatusBarHidden{
return YES;
}

Also in the viewWillAppear() method, set the navigation bar hidden :

-(void) viewWillAppear:(BOOL)animated{
    [self.navigationController setNavigationBarHidden:YES];
}
Utsav Parikh
  • 1,216
  • 7
  • 14
0

if u select the view in Interface Builder and go to attribute inspector, make sure those are bars are set to none.

owen gerig
  • 6,165
  • 6
  • 52
  • 91
  • this should be easily fixable in IB. but that comment didnt help alavoil so im not sure, if you want to post your project somewhere ill take a look but other than my original comment idk what else to offer without seeing the project (or at least a simplified version (to hide code you dont want public)) – owen gerig Nov 22 '11 at 14:14