我在Utility Application模板的另一面放了一张桌子。模板会自动将带有完成按钮的标题栏返回到前视图。
当选择了旁边桌子中的一个单元格时,它会调出相机/图像库选取器。但它留下了标题栏的位置,部分模糊了选择器界面。
如果选择器生效,如何删除标题栏? 感谢
答案 0 :(得分:2)
答案 1 :(得分:0)
我在这里完全进入圈内。显然我不理解一些基本的东西......
在我的RootViewController中,加载FlipsideView:
FlipsideViewController *viewController = [[FlipsideViewController alloc] initWithNibName:@"FlipsideView" bundle:nil];
self.flipsideViewController = viewController;
[viewController release];
// Set up the navigation bar
UINavigationBar *aNavigationBar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 44.0)];
aNavigationBar.barStyle = UIBarStyleBlackTranslucent;
self.flipsideNavigationBar = aNavigationBar;
[aNavigationBar release];
UIBarButtonItem *buttonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(toggleView)];
UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle:@"App Title"];
navigationItem.rightBarButtonItem = buttonItem;
[flipsideNavigationBar pushNavigationItem:navigationItem animated:NO];
[navigationItem release];
[buttonItem release];
同时,在我的FlipViewController中,它显示了图像选择器:
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// THIS IS NOT WORKING
[self.navigationController.navigationBar setHidden:YES];
[self presentModalViewController:picker animated:YES];
[picker release];
我评论过我认为会删除导航栏的那一点。
答案 2 :(得分:0)
在执行UIViewTransitionAnimationFlipFromLeft(或UIViewTransitionAnimationFlipFromRight)的动画块中,添加导航栏的删除:
[flipsideNavigationBar removeFromSuperView];