Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to silence the UIDevice setOrientation warning?

Anyone have a simple way to silence the undocumented UIDevice setOrientation warning?

I found this piece of code that silences the undocumented UIPickerView setSoundsEnabled warning.

like image 484
Epsilon Prime Avatar asked Nov 21 '25 02:11

Epsilon Prime


1 Answers

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
like image 149
coneybeare Avatar answered Nov 22 '25 17:11

coneybeare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!