任何一路沉默的UIDevice setOrientation警告?
-
18-09-2019 - |
题
任何人有一种简单的方法来沉默无证的UIDevice setOrientation警告?
解决方案
只是声明该方法在的任何地方使用它的.h
或.m
文件的类别:
@interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere)
- (void) setOrientation:(UIInterfaceOrientation)orientation;
@end
其他提示
为什么不直接订阅取向通知?他们同时支持和工作。
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
也许你应该尝试将控制器添加到直接在窗口视图。这是一个有点枯燥,但它工作得很好! HTTP:// WWW。 geckogeek.fr/iphone-forcer-le-mode-landscape-ou-portrait-en-cours-dexecution.html : - )
不隶属于 StackOverflow