有什么方法可以使UIDevice setOrientation警告静音? [英] Any way to silence the UIDevice setOrientation warning?
本文介绍了有什么方法可以使UIDevice setOrientation警告静音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
任何人都有一种使未记录的UIDevice setOrientation警告静音的简单方法吗?
Anyone have a simple way to silence the undocumented UIDevice setOrientation warning?
我找到了这个代码段会取消未记录的UIPickerView setSoundsEnabled警告.
I found this piece of code that silences the undocumented UIPickerView setSoundsEnabled warning.
推荐答案
只需在.h
或.m
文件的任何使用位置的类别中声明该方法:
just declare the method in a category in the .h
or .m
file of wherever you use it:
@interface UIDevice (MyPrivateNameThatAppleWouldNeverUseGoesHere)
- (void) setOrientation:(UIInterfaceOrientation)orientation;
@end
这篇关于有什么方法可以使UIDevice setOrientation警告静音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文