Re: Presenting modal vc repositions root vc
Re: Presenting modal vc repositions root vc
- Subject: Re: Presenting modal vc repositions root vc
- From: David Duncan <email@hidden>
- Date: Mon, 27 Jan 2014 14:57:03 -0800
On Jan 27, 2014, at 2:44 PM, Rick Mann <email@hidden> wrote:
> Well, by chance I found the cause of the problem, although I don't understand why. In my root view controller, I had this code, based on a StackOverflow answer I found about positioning a custom UIToolbar such that it would not be obscured by the status bar:
>
> - (void)
> viewWillLayoutSubviews
> {
> self.view.frame = [UIScreen mainScreen].applicationFrame;
> [super viewWillLayoutSubviews];
> }
Basically a view or view controller should never modify their external coordinate system, and this does that. There are a great many places where a parent view controller or window assume they have full control over the views of their children, and doing stuff like this breaks that control pretty handidly.
--
David Duncan
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden