Hacker News new | past | comments | ask | show | jobs | submit
I never really tried out Cocoa. What did you like about it?
At least for me, it just had/has the right mix of abstraction and simplicity. It just "ticked" in a way that for example MFC didn't.

But I also really liked Objective-C.

Cocoa and Objective-C are both great, but I think there's one huge problem that they never managed to solve well: responsive layouts.

Classic iPhone apps have fixed layouts, and classic Mac apps have a big dynamic document in the centre with mostly fixed toolbars around the sides, and dialogs with fixed layouts. Making a really dynamic layout with OS widgets is a huge pain, so most apps sidestepped it.

As Apple gradually added more and more slightly different sizes of iPhone and iPad, making good UI layouts got harder. Even handling screen rotations is a huge hassle! If iOS had proper support for resizing from the start, screen rotation would be trivial, just another window resize.

Xcode had Interface Builder and autolayout, but I found those to be disastrously fiddly and unusable. Maybe some people like them?

HTML has many problems of its own, but it does have good support for responsive layouts. CSS isn't perfect, but it's vastly better than anything you can find in macOS, iOS, Android or Windows.

It seems to me that SwiftUI was trying to tackle two problems at once: React-style declarative UI, and responsive layout. Those are both good ideas, but trying to tackle both in a single uber-framework and deprecating the lower layers was too ambitious. As somebody said elsewhere in this thread, SwiftUI could have been decent as just an optional helper on top of the existing UIKit / AppKit.

loading story #49155651
Good points. It's just that responsive layouts have not been fixed anywhere. Also on the web, it is way too hard. How often don't you see a box floating over some background photo and then covering the focal point, e.g. the face? Sure, it can be done, but the permutations of testing are simply too large for mere mortals.

Multiple 'artboards' for screen sizes/ratios are the solution, which basically just means swapping out a .nib in Interface Builder. Better to just make it explicit.