![]() So far, List was the main impediment (as long as you have a decent number of items to display). I can sacrifice certain features for my app, but I can’t sacrifice performance. There are still a lot of things that can’t be done using only SwiftUI. But it means that you need to learn a lot before you can use it efficiently, even if you are already familiar with the core principles behind it. It is almost nothing like AppKit which I think is a good thing. One of the criticisms I hear a lot is: “I started using SwiftUI and it took me T amount of time to build X, it would’ve taken me a fraction of time to do that in AppKit”. But the AppKit integration is always there for me. Maybe I’m just getting better at avoiding things that don’t quite work as expected. But I don’t have a lot of bugs to report 4. Prioritize watching WWDC and reading official documentation, there is now a lot of outdated information about SwiftUI online.Use Alert to show alerts, same API as iOS.Instead of navigationBarTitle, use navigationTitle.Use Settings to add a settings screen, don’t add it anywhere in the app itself.SwiftUI layout system and data flow are the same on macOS and iOS, see the linked posts to learn more.SidebarCommands, ToolbarCommands, TextEditingCommands, TextFormattingCommands. SwiftUI has several built-in command groups, e.g.When adding commands, use CommandGroupPlacement to place items in one of the standard locations.Use GeometryReader for layouts where SwiftUI layout system doesn’t cut it.Make sure your app looks great with all of them. ![]() On Big Sur, the system uses your app’s accent color by default, but the user can change the accent color to one of the predefined colors.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |