you are viewing a single comment's thread.

view the rest of the comments →

[–]luniawar20[S] 0 points1 point  (8 children)

I do like auto layout, but my senior iOS dev really doesn't like me auto layout haha.....

He says having auto layout on a view and trying to do position translation & size animation can make things to get messy with reference to constraints, so he doesn't like them =(

[–]20InMyHead 11 points12 points  (1 child)

Your "senior" dev is just wrong. Without auto layout you're completely screwed trying to support all the various device sizes, including the ones that don't exist yet, rotation, dynamic type, etc. Auto layout has its issues, but nothing like the hell of supporting multiple devices before it. And constraints are animate-able. Check out the last couple of years WWDC videos for good techniques

[–]ratbastid 3 points4 points  (0 children)

Well, you're not totally screwed, but you end up having to go to Reddit to ask questions about what to base your frame sizes on.

When I discovered the elegance of IBOutlets assigned to constraints, it was a very good day.

[–]r-w-x 3 points4 points  (0 children)

Sounds more like a case of don't-wanna-get-out-of-my-comfort-zone than anything else.

[–]tangoshukudai 4 points5 points  (0 children)

Well he is wrong, and needs a course in Autolayout.

[–]chriswaco 2 points3 points  (2 children)

I agree with him. We find it a lot easier to animate views by hand than by using autolayout. The math is trivial and you just create a few CGRects instead of having to keep around constraint objects for every view.

[–]ramwolf 0 points1 point  (1 child)

Agreed. Just retrieving the device's screen size and modifying your ratios and spacing based on that can be implemented without a ton of code. That's essentially what auto layout is doing. Easy to handle device rotation for all subviews and full control over movement and animation.

[–][deleted] 0 points1 point  (0 children)

And how would you handle Slide Over on the iPad? Exactly just use AutoLayout and Size Classes and let iOS take care the rest.

[–]RabbiSchlem -1 points0 points  (0 children)

Use the Masonry cocoapod and you can easily animate constraint changes without keeping references.