Currently I'm using a QLPreviewController in a navigation controller. (pushViewController)
To hide the navigationbar I use a UITapGestureRecognizer. The user can show/hide the navigation bar by a single touch (tap).
This worked well in iOS5
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
UITapGestureRecognizer *tapRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapped:)];
[tapRecognizer setNumberOfTapsRequired:1];
[tapRecognizer setDelegate:self];
[[self view] addGestureRecognizer:tapRecognizer];
[tapRecognizer release];
}
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
return YES;
}
- (void)tapped:(UIGestureRecognizer*)gestureRecognizer
{
//hide -/- show navigation bar
[[self navigationController] setNavigationBarHidden:![[[self navigationController] navigationBar] isHidden] animated:YES];
}
But in the released version of iOS 6 the taps are now completely ignored, so I can't hide my navigation bar anymore.
Reason why I want to hide the navigation bar?
If you open a .numbers document, the navigationbar hides the 'sheet-buttons' under the navigation bar.
Ty.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…