T
26

Picked auto layout over using constraints for a 3 page dashboard and I'm honestly confused why people push constraints so hard

Last month I had to build out a responsive dashboard for a client in Denver. Two devs on the team swore by constraints, said auto layout was too rigid. I went with auto layout anyway because it just made sense to me for stacking cards and forms. Honestly? I finished 2 days early and the dev handed it off with zero complaints. Am I missing something with constraints or is it just an old habit people won't let go of?
2 comments

Log in to join the discussion

Log In
2 Comments
uma_patel19
Is it possible constraints are actually better for certain screen sizes but nobody talks about what happens when you mix both approaches? I worked on a project where we used auto layout for the main dashboard but had to drop in constraints for this one weird widget that kept breaking on tablets. The cleanup took forever because the two systems fought each other on the iPad. Maybe the real trick isn't picking one, but knowing which pieces of the UI actually need constraints to stay sane. Especially if your dashboard has any resizable panels or split views.
-2
gavinwood
gavinwood15d ago
Oh yeah @uma_patel19 you're totally onto something with mixing approaches being the real headache! I've seen that too where the frame-based stuff and constraint-based stuff conflict at runtime because they're calculating positions differently. It usually works fine until you hit that one screen size where both systems try to override each other's frames and you get this flickering mess.
6