在我的应用程序中,我在导航栏的右键单击按钮上启动了一个 modalViewController。此 modalViewController 与导航栏重叠。我尝试设置它的框架,但它保持不变。即使 modalViewController 仍然存在,我也想显示导航栏。
编辑:我在导航控制器的右栏按钮按下时调用以下方法。视图显示正确,但位置不对。
-(void)showViewForPosts{
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:@"DISMISS"
style: UIBarButtonItemStyleBordered
target:self
action:@selector(dismissViewCOntroller)];
displayController = [[UIViewController alloc]initWithNibName:nil bundle:nil];
displayController.view.frame = CGRectMake(0.0, 150.0, 320, 436);
displayController.view.backgroundColor = [UIColor blueColor];
//I'M ADDING DIFFERENT VIEWS HERE
[self presentModalViewController:displayController animated:YES];
}
提前谢谢。