• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: UIPageViewController not resizing its child view controllers on rotation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: UIPageViewController not resizing its child view controllers on rotation


  • Subject: Re: UIPageViewController not resizing its child view controllers on rotation
  • From: Ben Kennedy <email@hidden>
  • Date: Tue, 30 Jun 2015 20:05:40 -0700

> On 30 Jun 2015, at 7:30 am, Devarshi Kulshreshtha <email@hidden> wrote:
>
> Though pagination control has resized properly, view of added view
> controller has not resized properly.

You haven't said so, but I presume that the UIPageControl belongs to your root view, and not pagesContainerViewController's view?

If so, the evidence suggests that autolayout is working correctly for the former but not the latter.  And presuming that is the case, then my suspicion lies with this line:

>        self.view.translatesAutoresizingMaskIntoConstraints = NO;

It is unusual to specify translatesAutoresizingMaskIntoConstraints on oneself, since it is almost always one's parent who is responsible for one's positioning. And absent any other constraints, this will remove its autoresizing with respect to its superview.

Hence, my guess is that the pagesContainerViewController's view has no constraints, and thus is getting unspecified layout (as manifest by its child UIPageViewController's view positioning).

What happens if you delete that line?

b


_______________________________________________

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


References: 
 >UIPageViewController not resizing its child view controllers on rotation (From: Devarshi Kulshreshtha <email@hidden>)

  • Prev by Date: Re: Would you pay for a better table view?
  • Next by Date: Re: Would you pay for a better table view?
  • Previous by thread: UIPageViewController not resizing its child view controllers on rotation
  • Next by thread: NSTableView row heights with auto layout and bindings
  • Index(es):
    • Date
    • Thread