Reputation: 768
Here I am trying to create designs in SwiftUI and I am guessing and constantly looking up modifiers on the web and wondering how did David Hudson know that there is such thing as .padding(EdgeInsets) available? If I had a list of absolutely every modifier available in SwiftUI on ONE long page I could guess my way forward. So, rather than me guessing the name I'd like to guess what they are doing!
Does anybody have such COMPLETE list??
And by the way - yes, the Apple developer webpage provides the info, but I want it in ONE list!
Upvotes: 4
Views: 4724
Reputation: 329
To see all available SwiftUI modifiers follow these steps in the photo attached.
Upvotes: 2
Reputation: 124997
wondering how did
David[Paul] Hudson know that there is such thing as .padding(EdgeInsets) available?
He looked in the documentation for View and then drilled down into Layout modifiers, eventually landing at the padding(...)
functions. Or at least, that's what someone should do when they're looking to adjust the layout of a SwiftUI view and don't know what functions are available. (Available evidence suggests that Hudson himself may be an intersect to which Apple uploads data using technology licensed from NBC.)
If I had a list of absolutely every modifier available in SwiftUI on ONE long page I could guess my way forward.
I don't think that'd be as useful as you might imagine, because many modifiers are specific to certain types of views. If you had one long list, you'd have to mentally filter out all the modifiers that don't apply to the view you're working on.
So, rather than me guessing the name I'd like to guess what they are doing!
IMO the best way to quickly find the modifiers that are available for the view you're working on is to use the attributes inspector in Xcode. The inspector has controls that let you apply various modifiers, including padding. There's also a text field at the bottom of the inspector labeled Add Modifier; click that, and a menu pops up showing all the available modifiers, and you can type in the field to filter the list.
Upvotes: 2
Reputation: 3353
The easiest way to find the list of all the modifiers in the Xcode search by searching View Modifiers
. The Xcode then gives you this list: Link to the Apple ViewModifiers documentation
I think this is the best we can do with standard modifiers. Also, keep in mind, that there are could be more of them in a project that you work on as anyone can add new modifiers to their projects.
Upvotes: 3