开发者

SplitView Controller Menu Overlay

开发者 https://www.devze.com 2023-01-16 12:29 出处:网络
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 开发者_如何学编程o

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号