for reference, I am using Xcode 6.1 and targeting IOS 7.1. Looks like there are posts with similar problems but the suggestions have not worked for me. I have an app which I designed to work only in landscape mode. So I set the project to support only Landscape Right and Landscape Left orientation. But when in my code I want to present a new viewController, the app throws an exception and crashes at the "presentViewController" statement in the code below:
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
PhotoViewController *photoVC = [storyboard
instantiateViewControllerWithIdentifier:@"PhotoViewController"];
// Configure the new view controller here.
//photoVC.view.frame = CGRectMake(0,0,self.view.bounds.size.width, self.view.bounds.size.height);
photoVC.view.frame = CGRectMake(0,0,568, 320);
[self presentViewController:photoVC animated:YES completion:nil];
By the way for testing purposes I hardwired 568 and 320 for the width and height.
The error message says:
uncaught exception 'NSInternalInconsistencyException', reason: 'Autolayout >doesn't support crossing rotational bounds transforms with edge layout >constraints, such as right, left, top, bottom. The offending view is: UITransitionView: 0x1701fa700; frame = (-2.84217e-14 0; 320 568); transform = [0, -1, 1, 0, 0, 0];
One thing I do not understand is why the "frame" in the error message shows 320 as width and 568 as height, when the "presentViewController" is passing a viewController with the frame set in landscape mode (width=568, height=320) . The error message also complains about "crossing rotational bounds transforms", which sort of hints that the viewController's view is being rotated?
any idea what is wrong?
thanks