Reckoned
(Reckoned)
1
I would like to know why in SwiftUI ListStyle types are structs and not enums
tera
2
You mean why is it a protocol, not an enum? No idea. Note that SwiftUI questions are out of scope on this forum.
Reckoned
(Reckoned)
3
my apologies meant Liststyle types
young
(rtSwift)
4
Most SwiftUI view styles are user extensible, though ListStyle is not currently, but could be in the future. Tthe design is the same as all other view styles. If it's an enum, then it cannot be extended/implemented by user. Look at LabelStyle, ButtonStyle: you can implement the protocol for your own style.
3 Likes