Post

Replies

Boosts

Views

Activity

iOS App shows blank screen after migrating to SwiftUI Lifecycle
This question was originally posted to StackOverflow, but I found it more suitable to be placed here. Was working on migrating one of my app from AppDelegate lifecycle to SwiftUI lifecycle according to this question. After following all the steps, The simulator simply shows a blank screen (the app does not launch at all): There is no log in the console. However, if the app is removed from the simulator (or device) and reinstalled, it will launch the new SwiftUI lifecycle correctly. So there seems to be some problem with scene caching that causes iOS to be confused after the migration. Am I missing something during the migration?
2
0
2.8k
Sep ’21
Achieve NSTrackingSeparatorToolbarItem in SwiftUI?
In AppKit, you can use the NSTrackingSeparatorToolbarItem item to create a toolbar item that automatically attaches to the separator in a split view. However, I didn't find an equivalent in SwiftUI yet. I tried to add a .toolbar modifier to each individual view, however, that didn't seems to achieve the effect. All the item are just on the right side of the window. Any native SwiftUI way to achieve this, or do I have to go back to using AppKit windows?
3
0
1.1k
Jul ’20