Re: Still can't get autolayout to work the way I want
Re: Still can't get autolayout to work the way I want
- Subject: Re: Still can't get autolayout to work the way I want
- From: Kevin Muldoon <email@hidden>
- Date: Thu, 19 Sep 2013 18:50:26 -0400
Yes, IB does automagically pop in constraints and for simple layouts, it works. But, with more complicated layouts, moving a single element around will rearrange one or more other constraints, generally breaking everything. I'm not familiar with the clear constraints command in IB, but like I was mentioning earlier, I'm avoiding the creation and use of .xib files for anything but the simplest layouts. Maybe iOS7 constraints have improved drastically, I just haven't had the time to dig into it. Anyway, this link is a nice intro into building UI from code with constraints...
http://ioscreator.com/auto-layout-in-ios-6-adding-constraints-through-code/
On Sep 19, 2013, at 6:31 PM, Rick Mann <email@hidden> wrote:
>
> On Sep 19, 2013, at 15:29 , Kevin Muldoon <email@hidden> wrote:
>
>> I love the power of auto-layout, but I'll be damned if I can make it behave when working on the GUI .xib file. I've taken to using auto-layout without .xib, building the UI elements in the viewController.m and attaching NSLayoutContraints manually. It's a bit of a pain, but if the layout is complicated I think it's time saved.
>
> Does IB not put in any constraints when you lay out the basic nib? Or do you do the "Clear Constraints" command when you're done? Do you remove them programmatically? How do you deal with the autoresizing constraints iOS still seems to apply?
>
> --
> Rick
>
>
>
_______________________________________________
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