Difference Between Implicit and Explicit Animations in SwiftUI
holyswift.app
holyswift.app
I know Apple is pushing it, and at some point it will be the default UI framework for iOS (it is for Vision Pro), but it has long way to go to the maturity that UIKit has.
For 'small apps', and for simple views SwiftUI is great. For more complicated interactions, UIKit is still the better framework.
My guess, over time, they will fix the issues, but that's the typical hickups of a framework that is still too immature.
It took Swift (the language) about 6-7 years to mature up. I think the language became 'mature' only around version 5.5. Whoever used it earlier, got to hit all kinds of weird issues and instabilities.
SwiftUI, will have a similar arch. My opinion is that it is about 2-3 years to be mature enough, to replace UIKit altogether.
Overall I think SwiftUI when released, and even today in some corners, is a general overall theme of incompleteness with features available in iOS 2's UIKit.
Did early iOS have it's irritating parts? For sure, but they were there for performance reasons mostly and it wasn't an 'incomplete' framework like SwiftUI is.
But all the complaints about its incompleteness are spot-on. How did they think it was ok to launch without basic stuff like NavigationStack? Standard Apple “piss on my head and tell me it’s raining”.
Meanwhile, the Home app can't be closed when viewing an accessory because they made it a modal, the Music app sometimes can't be searched because the search field looses focus on every keypress, and the AppStore may crash outright.
SwiftUIs text rendering also looks like ass, but that also could be the result of the choice of grey on grey the design B-team in charge of the redesign chose for text boxes.
I do agree though that the Home app is far worse. It sucks on iOS and they just copy pasted it over, and that UI with a mouse cursor is just painful and ugly. Unredeemable software.
Are you on a high DPI monitor? macOS stopped doing subpixel antialiasing a few versions ago. It’s not great for non-retina screens, but Apple seems to think everyone should have stopped using those by now.
It definitely has some tricky bits to get used to, some strange paradigms, but it's actually pretty good atm.
Your RxSwift codebase should have converted to Combine 3 years ago, and today you’d map the observable streams to SwiftUI with a simple @Published property wrapper (now called macro… ugh)
It’s really not that hard, and Combine can push your state to both new and legacy views with a few lines of hookup.
Almost every other technology I've ever seen for making things easier hits a wall once you're outside a usually very narrow path.
its hard to put my finger on it, but even compared to uikit, i feel much more productive there for some reason...
It's essential knowledge, but unreliable since Apple might change the behavior.
Apple documents the happy path, while they work out details. They now have many duplicate API's - SwiftUI, Foundation Essentials - in hopes of eventually retiring old API's. So for the next few years, developers will have to choose between legacy complicated API's and simplistic but unreliable new API's. To do that, we'll need a host of practical experiments to uncover the behavior of Apple's black boxes.