简体   繁体   中英

Pass rotation event through UIWindow and UIViewController

Here is psuedo code for my tweak

SBSearchViewController vcont = ...;
UIWindow window = ...;
[window retain];
window.windowLevel = 9999*9999;
window.hidden = NO;
window.rootViewController = vcont;
[window addSubview:vcont.view];
[window makeKeyAndVisible];

When there is a rotation event the keyboard successfully rotates but the actual contents of the UIWindow does not. This is a common problem but I don't know how to fix it. Any ideas?

删除此行:

[window addSubview:vcont.view];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM