Quantcast
Channel: SwiftUI build a list using enums - Stack Overflow
Viewing all articles
Browse latest Browse all 4

SwiftUI build a list using enums

$
0
0

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)'

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

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>