Hello i have an auto layout issue with UIScrollView
and ModalViewController
.
Here are my coding steps as sample code:
1) I have an UIView
From the documentation of UIViewController's presentViewController:
method:
This method sets the presentedViewController property to the specified view controller, resizes that view controller’s view and then adds the view to the view hierarchy. The view is animated onscreen according to the transition style specified in the modalTransitionStyle property of the presented view controller.
So the resizing of your view controller is intended. Well, by Apple, anyway.
One way to go about this is to log the resized view's coordinates and infer what exactly has been changed. Maybe you can adjust your constraints in a way to prevent this.
Alternatively, you could try resizing everything in the completion handler of this method.