In iOS 8, the methods for interface rotation are deprecated. This includes:
willRotateToInterfaceOrientation:duration:
didRotateFromInterfaceOrientation:
willAnimateRotationToInterfaceOrientation:duration:
The replacement methods include:
willTransitionToTraitCollection:withTransitionCoordinator:
viewWillTransitionToSize:withTransitionCoordinator:
If the new rotation methods are not implemented, and a project is compiled with the iOS 8 SDK, the view controllers -will not receive calls- to the deprecated rotation methods.
My concern is this: What happens to an app already in the AppStore built with the iOS 7 SDK? Will the deprecated rotation methods still be called on an iOS 8 device or not?
EDIT:
The rotation methods are still called, but there exist some changes/issues/bugs in iOS 8.
I would check that specific case to have 100% of confidence but I do not expect any troubles. I would also recommend you watching session
216 Building Adaptive Apps with UIKit
from WWDC 2014 to get more informations. It looks like the depreciated methods are not called so the app should be updated to work properly with devices running iOS 8.The rotation methods are deprecated in the iOS 8 SDK. This will have no effect at all on apps built with the iOS 7 SDK, even running in iOS 8 and probably several future versions of iOS.
As an example, the
font
property ofUIButton
has been deprecated since iOS 3.0 and is still available in iOS 7.0.I just had this issue and I wanted to use the same methods that I was using before (at least for now), so this is what I did.
I'm still not sure if I should use this outside of the animation block since I don't have the duration.
The deprecated rotation methods you've listed are still called when the app is run on iOS 8+ devices. If you are supporting iOS 7, you may continue to use them without issue. If you are only supporting iOS 8+, it would be wise to use the non-deprecated methods instead.
However, do note that if you implement the new rotation methods and the deprecated ones in the same view controller, when run on iOS 7 the deprecated methods will be called, and on iOS 8+ it will only call the new methods that have replaced those that are deprecated.
For example, if you only implement
willRotateToInterfaceOrientation
, this method will be called when run on iOS 7 and 8. If you then addviewWillTransitionToSize
, iOS 7 will still callwillRotateToInterfaceOrientation
but iOS 8 will not, instead it will only callviewWillTransitionToSize
.The rotation methods still work, BUT there exist other issues:
For me, here we rotate "things manually" with some calculations and a plist file that track the size of headers and things like that (so if we want to change something buttons and so on, we only change this plist not all individual xibs). And all our rotation code is inside
willLayoutSubviews
so all things are correct even on new iOS8... except for I Also I did see that for new ios8[[UIScreen mainScreen] bounds].size.width
now return the width acording to device orientation not to device real size.I will post this to other thread: