在子视图之上呈现ModalViewController?
我正在尝试重新创建 iPhone 的 tabView,但使用我自己的样式、按钮等。我不想完全重做我的应用程序,所以我只是在底部添加了一个视图,如下所示 [window addSubview:工具栏]; theToolbar.frame = CGRectMake(0, 425, 320, 44); 在我的 appDelegate 中。
但是,当尝试从 navigationController 内的视图执行此操作时,theToolbar
就超出了它。有没有办法以某种方式将其呈现在前面?
这是我展示视图的代码:
AppSettingsController *appSettings = [[AppSettingsController alloc] initWithNibName:nil bundle:nil];
appSettings.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:appSettings animated:YES];
[appSettings release];
谢谢。
I am trying to recreate the iPhone's tabView, but with my own style, buttons, etc. I didn't want to have to totally redo my app, so I simply added a view to the bottom like this [window addSubview:theToolbar]; theToolbar.frame = CGRectMake(0, 425, 320, 44);
in my appDelegate.
However, when trying to do this from a view inside a navigationController theToolbar
is over it. Is there anyway to somehow present it to the front?
Here's my code to present the view:
AppSettingsController *appSettings = [[AppSettingsController alloc] initWithNibName:nil bundle:nil];
appSettings.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
[self presentModalViewController:appSettings animated:YES];
[appSettings release];
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可能显示视图控制器的部分视图。如果您想使用相同的工具栏,您应该将工具栏保留到您的应用程序委托中,并在每个视图控制器处于视图中时将工具栏添加到它。
或者你应该只使用 uiview 作为视图控制器
it's impossible show partial views of the viewcontroller. if your want to use the same toolbar, you should retain the toolbar to your appdelegate, and add the toolbar to each viewcontroller when it is in view.
or you should just use uiview's as viewcontrollers