How to move from custom to transluscent NavigationBar and back? Display problems!
- by jd291
So, i got this Navigation-based App (with a custom NavigationBar - Category) and I have 2 problems here...
@implementation UINavigationBar (Custom)
- (void)drawRect:(CGRect)rect {
UIImage *image = [UIImage imageNamed: @"bg_toolbar.png"];
[image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
}
@end
Because of the Navigation-based App, most of the views have a height of 436px (= ScreenSize - NavigationBar height, as you probably know ;).
I got one view similar to the photo app overview showing all the thumbnails, from there I push a viewcontroller containing the scroll view (like in photos app) on the stack, like so
- (void)buttonPressed:(id)sender
{
UIButton *btn = (UIButton *)sender;
PhotoSetScrollViewController *psc = [[PhotoSetScrollViewController alloc] initWithPhotoArray:photos andID:btn.tag];
[self.navigationController pushViewController:psc animated:YES];
}
Problem 1:
The view holding the fullscreen scrollview has a height of 480px which seems to be a problem because when poping the viewcontroller by hitting the back button, the view containing the thumbnails (height 436px) moves upward below the navigation bar. And also the Toolbar keeps showing. What could be the problem?
Problem 2:
How could I switch between my custom navigation bar and the standard black translucent style?