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 protected]
_______________________________________________
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]