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];
}
I did this many months ago, probably before this technote:
https://developer.apple.com/library/ios/qa/qa1797/_index.html
Anyway, removing that fixed all the weird behaviors. I don't know how or why.
It seems that presenting a modal, full-screen VC from the root VC shortly after
viewDidAppear causes a couple of things:
- The current root view controller is removed from the window, and the
presented VC is made the root.
- The application frame changes size.
Removing that code, and installing the top layout guide constraint on the
UIToolbar seems to have fixed the resize issue, but not another issue I have
where removing a sub view of the root view controller causes the
UIBarButtonItems' text to shrink. This one still eludes me.
On Jan 25, 2014, at 16:37 , Rick Mann <[email protected]> wrote:
> I can't figure this out. I've got a view hierarchy that's been working fine.
> I added a modal, full-screen tutorial to my storyboard that's triggered on a
> segue from a button in a popover-contained table view. That works fine, too.
>
> Now I'm trying to display the same tutorial the first time the user runs the
> app. I get it from the root view controller's storyboard, and call -[self
> presentViewController:animated:completion:] on it. Just before presenting it,
> I see my entire view hierarchy shrink down (to what might be portrait width
> in landscape mode; it's a landscape-only app). Elements inside a smaller,
> too, not just repositioned.
>
> After the modal VC is dismissed, you see the shrunken view, then it snaps
> back to full size, but the UIBarButtonItems stay shrunken.
>
> Why is this happening? Why does Apple not test anything any more?
>
> --
> Rick
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list ([email protected])
>
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
>
> This email sent to [email protected]
--
Rick
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Cocoa-dev mailing list ([email protected]) 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
