Live data from Hacker News

iOS4 Built in SwiftUI

github.com

31–40 of 45 posts

Re: iOS4 Built in SwiftUI

#32
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.

I agree that ideally the code could be organized a lot better, but think about it like this:

It is the fully working safari UI in only 1000 lines of code. Additionally the declarative approach of SwiftUI together with the type system makes it certainly correct in many ways: no rendering bugs, no invalid states, probably no memory leaks, no cyclic dependencies creeping in.

Try to build this in Java Swing, UIKit, Html/Css/Js or any other UI library. Flutter might come close, react/vue/svelte as well, if you assume sensible predefined components. But they work similar to SwiftUI and the resulting one-file might look pretty similar.

Re: iOS4 Built in SwiftUI

#33
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.

I agree that ideally the code could be organized a lot better, but think about it like this: It is the fully working safari UI in only 1000 lines of code. Additionally the declarative approach of SwiftUI together with the type system makes it certainly correct in many ways: no rendering bugs, no invalid states, probably no memory leaks, no cyclic dependencies creeping in. Try to build this in Java Swing, UIKit, Html/…

Agreed, i hacked together something resembling a midi-sequencer UI in about 1000loc with JS+Vue.

I have an old editor written in Java/Swing that takes more and more willpower to work on every time because handling state update bugs is what i spend half my time on.

Re: iOS4 Built in SwiftUI

#36
Wow, this is a throwback to middle school with an iPod touch 2nd gen. I remember when the update allowing custom backgrounds came out, and I don't even know if my device could get it.

I haven't used an Apple mobile product in years (just Mac's for work), but damn did this hit me with some nostalgia.

Re: iOS4 Built in SwiftUI

#37
post #36

Wow, this is a throwback to middle school with an iPod touch 2nd gen. I remember when the update allowing custom backgrounds came out, and I don't even know if my device could get it. I haven't used an Apple mobile product in years (just Mac's for work), but damn did this hit me with some nostalgia.

You could... if you got it jailbroken :)

Re: iOS4 Built in SwiftUI

#38
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.

I really think SwiftUI is hamstrung by trying to create a DSL that can describe a UI spanning everything from your watch to a desktop. The Apple world is starting to feel more like Google and MS with multiple UI frameworks coming out of different groups and no clear communication on what the long term plan is or expectation from developers. From what I can see though it looks like Catalyst is still very much a thing and I don't think that UIKit is going away anytime soon.

Re: iOS4 Built in SwiftUI

#40
post #39

Screenshots: https://imgur.com/a/JNVaFBI

The dialpad for the Phone app was absolute perfection.

Huh. I like almost all the UI in this better than current iOS. Good placement, clear at a glance what everything is. This strengthens my sense that iOS has been going downhill, UI-wise, since v7 came out.
Post reply on HN