【发布时间】:2013-01-20 00:08:59
【问题描述】:
我目前在我的 iPhone 应用程序中同时运行三个视图控制器。
我使用slidingView。
这是我的图片:
当我点击表格视图单元格时,我想像这样打开一个新的视图控制器:
(鸡蛋代表一个新的视图控制器。
但是你可以看到我的橙色视图控制器在前面。
我该如何更改?
我用来打开egg-viewcontroller的代码:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
UIViewController *boxView = [self.storyboard instantiateViewControllerWithIdentifier:@"BoxView"];
boxView.modalPresentationStyle = UIModalPresentationFormSheet;
boxView.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
boxView.view.frame=CGRectMake(-50, 5, 300, 470);
[self.view addSubview:boxView.view];
//[self.view bringSubviewToFront:boxView];
}
【问题讨论】:
标签: ios uiviewcontroller containment uimodalpresentationstyle