SplitView 控制器菜单覆盖
我正在尝试在 iPad 的分割视图应用程序之上创建一个菜单覆盖系统。菜单覆盖系统应该支持几个按钮,其中一个按钮将使覆盖消失并显示 SplitViewController。
我的应用程序委托如下:
UIView *view = [[UIView alloc] init];
[view addSubview:[splitViewController view]];
[view addSubview:[mainMenu view]];
[window addSubview:view];
[window makeKeyAndVisible];
UIView 正在显示,但以一种非常奇怪的分散方式显示,许多界面功能没有响应。
有什么帮助吗?
谢谢,
CSwat
I'm trying to create a menu overlay system on top of a split view application for the iPad. The menu overlay systems is suppose to support a few buttons, one of which will make the overlay disappear and show the SplitViewController.
My application delegate is as follows:
UIView *view = [[UIView alloc] init];
[view addSubview:[splitViewController view]];
[view addSubview:[mainMenu view]];
[window addSubview:view];
[window makeKeyAndVisible];
The UIViews are showing up, but in a very weird scattered manner with many interface features not responding.
Any help?
Thanks,
CSwat
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
想通了。 UIWindow 无法处理多个视图。您需要添加一个视图,在适当的时候使用 [myView.removeFromSuperview] 将其删除,然后添加下一个视图。
Figured it out. UIWindow cannot handle multiple views. You need to add one view, remove it with [myView.removeFromSuperview] when appropriate, and add the next view.