4 ms·
It makes sense after you've worked with it for a little bit, I had the same confusion when I first started using it but after a while it started making sense an
by sondr3 11y ago
It makes sense after you've worked with it for a little bit, I had the same confusion when I first started using it but after a while it started making sense and by now I absolutely cannot see myself go back to anything else, it's just so pleasant to write in.
- alexashka 11y agoI agree, when you're forced to eat at McDonalds, choose the shitty salad. Have you worked with auto-layout in xcode? If you did that and used flexbox and chose flexbox, I'd be flabbergasted. Given the choice between blocks, inline-blocks, floats and flexbox - I'm choosing flexbox 100% of the time. Doesn't mean it's not painful however, just that the other options are insane.
- pcwalton 11y agoI prefer flexbox to auto layout in Xcode, actually. In fact, for Mac apps I've always turned off auto layout and gone back to springs and struts, since they're so much simpler...
- alexashka 11y agoHehe that'll come to bite you ;) I'd actually equate auto-layout when it was first introduced to the current state of flexbox. It can do what you want but boy are there some gotchas along the way. It has gotten a lot better - the pain point with autolayout remains when when you need to add constraints in code - then it's a painful API. In UI, it is quite a pleasure to work with I find. I wonder when that's coming to web dev - a GUI for web layout using flexbox would make a lot of people happy. The reason dreamweaver and the like didn't work well is because there were too many gotchas, do this in javascript, that in css, etc. With flexbox, css selectors and some good plug'n'play javascript components (carousel, etc, everything bootstrap offers basicaly) - I can see a tool like Dreamweaver making a big comeback. What do you think?
- woah 11y agoAuto layout is fiddly and annoying. You have to specify at least 3 or 4 constraints per element, often more. It also has no concept of flow, which in my book makes it essentially useless for many applications.
- alexashka 11y agoSpecifying constraints one time and having them work across landscape/portrait and different sizes, all done in a UI interface, with warnings/errors to help you out. Being able to specify relationships of any element to any other element. So much worse than typing in a text file, saving, refreshing your browser, testing in different browsers, testing on different phone devices, polyfills, -webkit, etc etc etc. Autolayout got ways to go to catch up to web dev huh :) I feel your pain regarding auto layout being difficult SOMETIMES but if you've come from web dev and you're not crying tears of joy at not having to waste your life trying to create proper column layouts with a footer and a header (the 'holy grail' of web dev, lol the bar is set so low it's hitting me in the ankle), I don't know what to tell you :) Also, what the heck is this flow concept. I hope you're not referring to uicollectionview which has, flow layout, lol.