• 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: Any way to get a popover view to be sized by autolayou?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any way to get a popover view to be sized by autolayou?


  • Subject: Re: Any way to get a popover view to be sized by autolayou?
  • From: Kyle Sluder <email@hidden>
  • Date: Thu, 20 Feb 2014 17:41:11 -0800

On Thu, Feb 20, 2014, at 04:51 PM, Rick Mann wrote:
> I have a view controller with associated xib file that uses autolayout.
> This VC gets presented in a popover. I'd like for it to define its own
> size, but I don't seem to be able to do that. If I provide constraints
> that fully specify the size (via constraints between the content and the
> outermost view), I get "Unable to simultaneously satisfy constraints"
> errors (with the damn autoresizing mask constraints you still can't get
> away from in iOS).
>
> If I set -translatesAutoResizingMaskIntoConstraints to false in
> -viewDidLoad, I don't get those complaints, but the popover is very tall
> (it seems to have the correct width).
>
> Is this even possible to do?

No, you cannot directly control the size of a popover using constraints.
Please file a radar asking for this functionality.

You _can_, however, use -systemLayoutSizeFittingSize: on your content
view to figure out its desired size before assigning the view controller
to the popover. This doesn't let you dynamically affect the size of the
popover at runtime, but it does save you from performing manual
calculations.

--Kyle Sluder
_______________________________________________

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


  • Prev by Date: Re: Disabling screen capture
  • Next by Date: NSNumber : method to return pointer to represented value
  • Previous by thread: Re: Disabling screen capture
  • Next by thread: NSNumber : method to return pointer to represented value
  • Index(es):
    • Date
    • Thread