On Nov 2, 2012, at 10:41 AM, Luke Hiesterman <luket...@apple.com> wrote:

> it's not in the view hierarchy, in which case the autolayout engine won't do 
> anything for you

Okay, the good news is that this turns out to be false! It turns out that you 
*can* exercise the autolayout engine for any view hierarchy by sending 
layoutIfNeeded to it. A lucky discovery.

So I can certainly make a hierarchy and lay it out with constraints and 
autolayout, without putting that hierarchy into the visible interface.

My problem now is just that I can't seem to find the autolayout fu that will 
cause a view containing a label to be laid out by the label, rather than the 
other way round.

In other words, I have a view superview and a label subview; I am resizing the 
label by giving it text content and saying sizeToFit; and now the label is the 
right size. So now I am going to exercise autolayout, and I want the view 
superview to resize to meet the constraints relating the superview to the label 
- what's happening instead is that the label is resizing again and the 
superview is staying the same.

m.

--
matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/
pantes anthropoi tou eidenai oregontai phusei
Programming iOS 5! http://shop.oreilly.com/product/0636920023562.do
RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html
TidBITS, Mac news and reviews since 1990, http://www.tidbits.com


_______________________________________________

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