3 ms·
Sometimes I feel like the only one who's totally fine with AutoLayout as-is. IMO it is hands-down the most straightforward and easy to understand way of constru
by Klonoar 8y ago
Sometimes I feel like the only one who's totally fine with AutoLayout as-is. IMO it is hands-down the most straightforward and easy to understand way of constructing UI, and I've dealt with an insane number of UI toolkits over the years.
Furthermore, anytime I see someone complaining about it and I check out their solution with AL... they've overcomplicated how they're setting constraints and doing the layout, and it ends up usually being the issue more than AL itself.
- eridius 8y agoAgreed. About the only thing I do on top of it is add some operators for setting up AutoLayout, so I can write code like NSLayoutConstraint.activate([ label.topAnchor ≈ view.topAnchor, label.leadingAnchor ≈ view.leadingAnchor + 8, label.centerXAnchor ≈ view.centerXAnchor, view.bottomAnchor ≥ label.bottomAnchor ])
- favorited 8y agoSame. Especially now that we have NSLayoutAnchor. Sure, it wasn't ideal when VFL was more widely used, but these days it works great and is as readable as any DSL I've seen.
- cuddlybacon 8y ago> Sometimes I feel like the only one who's totally fine with AutoLayout as-is. Agreed. It took me a while to find some idioms I like, but once I did that I like it quite a bit more than what I was doing in HTML land (note: not a webdev). It probably helps in my case that this is a solo project so I had the freedom to try a bunch of different styles until I found one I like. I find the bad part is how user events are handled, particularly when multiple parts of the UI need to be changed. This, like autolayout, could be an issue of inexperience.