【发布时间】:2009-11-05 18:35:54
【问题描述】:
任何人有一个简单的方法来消除未记录的 UIDevice setOrientation 警告?
我发现这个piece of code 可以消除未记录的 UIPickerView setSoundsEnabled 警告。
【问题讨论】:
标签: iphone warnings uidevice setorientation
任何人有一个简单的方法来消除未记录的 UIDevice setOrientation 警告?
我发现这个piece of code 可以消除未记录的 UIPickerView setSoundsEnabled 警告。
【问题讨论】:
标签: iphone warnings uidevice setorientation
只需在.h 或.m 文件中的类别中声明方法即可:
@interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere)
- (void) setOrientation:(UIInterfaceOrientation)orientation;
@end
【讨论】:
@interface UIDevice ()。
为什么不只订阅方向通知?它们同时得到支持和工作。
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
【讨论】:
也许您应该尝试将控制器直接添加到窗口视图中。这有点无聊,但效果很好! http://www.geckogeek.fr/iphone-forcer-le-mode-landscape-ou-portrait-en-cours-dexecution.html :-)
【讨论】: