Running on iOS 8, I need to change the UI when rotating my app.
Currently I am using this code:
-(BOOL)shouldAutorotate
{
UIDeviceOrientation ori
Timur Kuchkarov is correct, but I'll post the answer since I missed his comment the first time I checked this page.
The iOS 8 method of detecting orientation change (rotation) is implementing the following method of the view controller:
- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id)coordinator
{
// Do view manipulation here.
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
}
Note: The controller's view has not yet transitioned to that size at this time, so be careful if your sizing code relies on the view's current dimensions.