Im looking to create an icon picker, and tried this:
ForEach(Awesome.Brand) { item in
//
}
But this gives an error: Cannot convert value of type 'Awesome.Brand.Type' to expected argument type 'Range<Int>'
I also tried:
private var icons = [Awesome.Brand.apple, Awesome.Brand.google]
...
ForEach(icons) { item in
///
}
But that gives another error: Referencing initializer 'init(_:content:)' on 'ForEach' requires that 'Awesome.Brand' conform to 'Identifiable'
Is there anyway to do this? Could the creator just add Identifiable to the icon groups? Im still new so not sure if that's the solution here.
Thanks
Im looking to create an icon picker, and tried this:
But this gives an error:
Cannot convert value of type 'Awesome.Brand.Type' to expected argument type 'Range<Int>'I also tried:
But that gives another error:
Referencing initializer 'init(_:content:)' on 'ForEach' requires that 'Awesome.Brand' conform to 'Identifiable'Is there anyway to do this? Could the creator just add
Identifiableto the icon groups? Im still new so not sure if that's the solution here.Thanks