Quantcast
Viewing all articles
Browse latest Browse all 4

SwiftUI build a list using enums

I am trying to create SwiftUI List based on enum strings. I am faced with this error:

Cannot invoke initializer for type 'List<_, _>' with an argument list of type '([HomeView.Data], @escaping (String) -> HomeMenuRow)'

Image may be NSFW.
Clik here to view.
enter image description here

I can't understand how to use id or how to iterate through enum to build a row.


Viewing all articles
Browse latest Browse all 4

Trending Articles