• 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
Automatically sizing a UIPopoverController
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Automatically sizing a UIPopoverController


  • Subject: Automatically sizing a UIPopoverController
  • From: Rick Mann <email@hidden>
  • Date: Tue, 09 Aug 2016 18:47:09 -0700

I'm having a hard time getting my popover to size automatically based on autolayout constraints. I want to fix the width, but have the height auto-adjust. It contains a single UITextVIew. There are constraints for each edge, and a width constraint.

Google doesn't seem to help much.

I tried setting the content hugging priority very high, but that didn't work (and in the end I still need to put an upper limit on the height).

In addition, I get an "Unable to simultaneously satisfy constraints" complaint. It seems to conflict with a 'UIView-Encapsulated-Layout-Width' constraint that's applied by the system somewhere. I'm not sure where this is coming from.

Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want.
	Try this:
		(1) look at each constraint and try to figure out which you don't expect;
		(2) find the code that added the unwanted constraint or constraints and fix it.
(
    "<NSLayoutConstraint:0x7fb823c8ae60 H:[UITextView:0x7fb82407f600'4 Bedroom Family Home\nby\U00a0...'(224)]>",
    "<NSLayoutConstraint:0x7fb8225f1930 UIView:0x7fb8225ee8b0.trailingMargin == UITextView:0x7fb82407f600'4 Bedroom Family Home\nby\U00a0...'.trailing>",
    "<NSLayoutConstraint:0x7fb8225f19d0 UIView:0x7fb8225ee8b0.leadingMargin == UITextView:0x7fb82407f600'4 Bedroom Family Home\nby\U00a0...'.leading>",
    "<NSLayoutConstraint:0x7fb822483110 'UIView-Encapsulated-Layout-Width' H:[UIView:0x7fb8225ee8b0(320)]>"
)

Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fb823c8ae60 H:[UITextView:0x7fb82407f600'4 Bedroom Family Home
by ...'(224)]>


--
Rick Mann
email@hidden



_______________________________________________

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: NSImage drawInRect deadlock
  • Next by Date: Re: NSImage drawInRect deadlock
  • Previous by thread: Re: App shows no windows; Developer ID lacks "entitlements"?
  • Next by thread: Dynamic-width Collection View
  • Index(es):
    • Date
    • Thread