Re:SwiftUI for Mac 2024
by jitl on Thursday August 22, 2024 @08:48AM
(#41319680)
I’m a lot happier with UIKit/AppKit plus SwiftUI than with just SwiftUI alone.
I wrote a couple of small sized apps trying to use only SwiftUI “the right way” to learn the framework and as you say whenever I wanted to do something specific with a lot of control I’d hit a wall with SwiftUI and have to go crazy with wild work arounds and trial-error throw spaghetti at the wall or
just give up.
Now I’m writing another app and making heavy use of NSViewRepresentable use AppKit from SwiftUI, and NSHostingView to embed SwiftUI in AppKit views. I’m using mostly SeiftUI at the “leafs” of the view hierarchy, and AppKit towards the root; all my windows use a NSWindow subclass and/or a view controller.
Re:SwiftUI for Mac 2024
by jitl on Thursday August 22, 2024 @12:16PM
(#41321838)
I find creative visual styling of views like drawing paths/shapes, drop shadows, quick stacks/rows, grid panels, etc all much easier and faster with SwiftUI and SwiftUI #Preview.
I wrote a couple of small sized apps trying to use only SwiftUI “the right way” to learn the framework and as you say whenever I wanted to do something specific with a lot of control I’d hit a wall with SwiftUI and have to go crazy with wild work arounds and trial-error throw spaghetti at the wall or just give up.
Now I’m writing another app and making heavy use of NSViewRepresentable use AppKit from SwiftUI, and NSHostingView to embed SwiftUI in AppKit views. I’m using mostly SeiftUI at the “leafs” of the view hierarchy, and AppKit towards the root; all my windows use a NSWindow subclass and/or a view controller.
Much happier with this!