Live data from Hacker News

iOS4 Built in SwiftUI

github.com

21–30 of 45 posts

Re: iOS4 Built in SwiftUI

#21

Earlier quoted context omitted.

For those who have used both Flutter and SwiftUI, did you ever find that deep nesting to be very ugly and strange?

Deep nesting suggests that you need to break parts out into their own views (or pull logic out into their own functions). Like the close box in that file, it’s a great candidate for turning into its own view, or at least moving it’s action into a separate function.

This! It’s generally a good idea to have a lot of smaller “dumb” views that are stateless and depend on their parameters, and a few “intelligent” views that bring the children together and provide state logic. That puts reasonable boundaries between the view and business logic, even in declarative code like SwiftUI.

I’m not a Swift or SwiftUI expert, but have written declarative UI quite a bit. Don’t imagine some base best practices would differ too much.

Re: iOS4 Built in SwiftUI

#23
post #8

This is great! While I really do like the flat UI design trend, I sure do miss skeuomorphism in UI design. I underestimated the nostalgia that seeing this original design would stir up in me.

I like flat UI design and skeuomorphism too. However I am not a fan of what Apple's doing with half skeuomorphism in the latest MacOS. The new app icons look absolutely hideous. And based on anecdotal comments from others, I am not alone. Also them trying to make the MacOS app icons similar to iPadOS's rounded corner ones made it even worse.

> And based on anecdotal comments from others, I am not alone

While this case I'm in 100% agreement with you, in my experience I don't think I've ever seen any people I know like changes to icons!

Re: iOS4 Built in SwiftUI

#25
post #9

Earlier quoted context omitted.

Did you look at the file? Yes, comparatively using a non-declarative approach would render much simpler code. Perhaps the author is not writing SwiftUI proficiently? Having used SwiftUI myself I would argue that this is not the case.

It reminds me of why I am not a big fan of Flutter either. Not a fan of the deep nesting which both SwiftUI and Flutter needs to do for even moderately complex UIs.

This is a fun project so whatever code goes, but this could easily be broken into many small chunks. There’s even a context my button to pull subsections out into smaller strict automatically.

Re: iOS4 Built in SwiftUI

#26
What I like most about this is how great and intuitive it is as a learning exercise. You have to re-construct the Camera, Maps, Safari, iPod, etc etc etc apps, and to make them functional, you need to call the system APIs for accessing web views / camera readings / etc.

That’s exactly what the author did. It’s like a “learn to build X clone” but for many different X’s.

With that said, he really needs to delete those .DS_Store files scattered everywhere in his repo. Ouch.

Re: iOS4 Built in SwiftUI

#27
post #6

This file is insane: https://github.com/zzanehip/The-OldOS-Project/blob/master/Ol... I hate to say it but SwiftUI is tricky to write for very complex user interface...the one in that file is a nightmare imo.

The flutter people call this Nesting of layout and logic their secret sauce ! Opinions may vary

Re: iOS4 Built in SwiftUI

#28
post #6

This file is insane: https://github.com/zzanehip/The-OldOS-Project/blob/master/Ol... I hate to say it but SwiftUI is tricky to write for very complex user interface...the one in that file is a nightmare imo.

It’s fairly poorly abstracted, I guess OP is writing this more for fun. You could hide a lot of this implementation stuff in extensions, view modifiers and by composing views and splitting out event handlers. It isn’t representative of SwiftUI really.

Re: iOS4 Built in SwiftUI

#29
post #23

Earlier quoted context omitted.

I like flat UI design and skeuomorphism too. However I am not a fan of what Apple's doing with half skeuomorphism in the latest MacOS. The new app icons look absolutely hideous. And based on anecdotal comments from others, I am not alone. Also them trying to make the MacOS app icons similar to iPadOS's rounded corner ones made it even worse.

> And based on anecdotal comments from others, I am not alone While this case I'm in 100% agreement with you, in my experience I don't think I've ever seen any people I know like changes to icons!

Or to further extend that, I've not seen any people like visual changes. Even though the science is there that the new design is better, people don't like change.

Re: iOS4 Built in SwiftUI

#30
post #23

Earlier quoted context omitted.

> And based on anecdotal comments from others, I am not alone While this case I'm in 100% agreement with you, in my experience I don't think I've ever seen any people I know like changes to icons!

Or to further extend that, I've not seen any people like visual changes. Even though the science is there that the new design is better, people don't like change.

Which is one reason why (UI) engineers should be designing interfaces and prioritising usability, rather than artists who prioritise conformity with contemporary fashion and branding.

Appearance can certainly change, but the needs of the user, including for predictability, should be very important to the process of deciding to change and making the change. At the moment the reputation of the company and the artist are considered to the dominate over most other matters. It is simply reckless to do this at a time when public trust is so limited. It is the constant responsibility of everyone who acts in public to try and rebuild.

Post reply on HN