I am not using Size classes in my project and continue to use old methods for view controller orientation. I am getting deprecation warnings, such as when I use code below :
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
...
}
I have searched a lot but could not find the right way to fix it. Any suggestions ?
Should change
if (UIInterfaceOrientationIsPortrait(self.interfaceOrientation)) {
...
}
to
if (UIInterfaceOrientationIsPortrait([[UIApplication sharedApplication] statusBarOrientation])) {
...
}