Answer the question
In order to leave comments, you need to log in
How to "read"/"understand" the SwiftUI documentation?
Hello everyone, reading the documentation for the same C #, everything is extremely simple and clear. This is responsible for this, this is responsible for that. But I just can't figure out how to take the Apple documentation? For example, I'm currently studying SwiftUI, trying to make a test-training project. The question arose of how to position a specific View, from the very bottom. It is clear that this can be done "programmatically"
BottomMenu()
.offset(CGSize(width: 0, height: screenHeight / 2 - 40))
Answer the question
In order to leave comments, you need to log in
Well, I won’t say how often (but enough to notice) in the Appl documentation there are such empty articles where you can’t figure it out without stackowerflow. So don't talk to yourself.
To make anchorPreference work, you need to implement a custom class (struct) that satisfies the PreferenceKey protocol . (...some View where K : PreferenceKey).
.anchorPreference(..., transform: { MyPreferenceKeyValue(myVariableToStoreAnchor: $0) })
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question