Hi guys, as many of you (I think), I have been busy learning SwiftUI as fast as I can. In my case for a new app I want to develop for personal purposes and probably for an App Store release.
In my (small) learning journey I have found a few things that SwiftUI is missing or just not working, but since there is not too much information yet I wanted to make a simple thread with all the things I have found at the moment. This can be useful for anyone who is learning SwiftUI or wants to check current SwiftUI status.
I promise to add my findings here and update this post as fast as I can.
Feel free to mention every feature you think is important to have in the list, any features you think is not a bug or broken/missing feature, or any solution you may find to one of this mentioned problems.
Ps: I know we have Xcode release notes but many of the current bugs of SwiftUI are not mentioned there.
SwiftUI missing/broken features (as of beta 3):
- Can’t remove rows separator from List
- Can’t push or pop without navigationView
- Can’t display a modal in full screen (only in the new style)
- No dismiss modal programatically available (environment safe keypath maybe is the correct solution?)
- Custom Fonts are sometimes not rendered correctly on Xcode Previews (A little bit fixed in Beta 3 but still buggy)
- Code Completion in some places is not working (haven’t found a specific way to reproduce the bug consistently but definitely happens)
- Pinch to Zoom is not working in Xcode Previews
- Switching between files that have or not have a cambas may cause the cambas to remain open
- No way to remove the accessory item of a navigationLink inside a List
- Cant hide navigation bar from NavigationView (There is a new modifier called navigationBarHidden but when the next view is pushed, the navigationBar returns. The modifier only works for the first view not pushed ones)
- Cant add a custom navigation bar to NavigationView
- Colors in foregroundColor modifier are not updating in Previews correctly. Sometimes they work but most of the time is the same black color (Working better in beta 3 but some objects including navigationView are still having problems)
- TextFields do not have a way of setting their keyboard type.
- TextFields do not have the equivalent of UIKit beginFirstResponder and resignFirstResponder. That means there is no way of programatically setting or removing the focus from a text field.
- SecureField does not have a way of knowing when the field became active, or inactive (TextField does have onEditChange, but SecureField does not).
- Popovers as of beta3 seem to be broken.
- Slider seems broken in Beta 3. No longer increment by Stride
- .onAppear and .onDisappear are not firing during navigation transitions
- TextFields are not resized properly when multiline text is used
- Forms are not available (Now available in Beta 2)
- Published property wrapper is not fully functional (Available since Beta 2 in Xcode projects. Playgrounds not working)
- Colors added directly to the xcassets are not working in dark mode (Working in beta 3)
- LaunchScreen is sometimes stuck with old layouts (happens to me only in SwiftUI projects sometimes) (Working in Beta 3)
- There is no simple way to change the main view background color (Use background modifier, see answer 3)