On Feb 20, 2014, at 17:41 , Kyle Sluder <k...@ksluder.com> wrote:

> 
> 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.

Thanks, Kyle, that worked great, and perfectly adequate for my current needs. 
Bug submitted: 16128848


-- 
Rick



Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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 arch...@mail-archive.com

Reply via email to