3 ms·
It needs to have more conceptual articles with code listings like this https://developer.apple.com/documentation/swiftui/managing-model-data-in-your-app https:/
by Austin_Conlon 6y ago
It needs to have more conceptual articles with code listings like this https://developer.apple.com/documentation/swiftui/managing-model-data-in-your-app https://developer.apple.com/documentation/swiftui/managing-m....
- wlesieutre 6y agoYes please. Finding a “see also” link to one of those is the best, because you know it will actually show you how to use it. Otherwise you’re probably on your own. For example, Previews are one of SwiftUI’s major features. Here’s its docs page: https://developer.apple.com/documentation/swiftui/previews https://developer.apple.com/documentation/swiftui/previews You could read through that and all of the linked pages and still have no idea how create a preview. Want to preview it on a particular device? Well, I can see there’s a PreviewDevice, it’s initialized from various kinds of strings, and absolutely no information on how to apply it. Turns out this is a SwiftUI modifier that you chain off of your view inside the struct that adheres to the PreviewProvider protocol. See example here: https://www.hackingwithswift.com/quick-start/swiftui/how-to-preview-your-layout-in-different-devices https://www.hackingwithswift.com/quick-start/swiftui/how-to-... Could you construct that example from having read the documentation? I doubt it.