Is there a way to remove or resize the image from the tag in the Picker view?
Picker("", selection: $selectedCategory) {
ForEach(categorySM.categories, id: \.self) { category in
HStack {
if let inputImage = UIImage(data: category.image ?? Data()) {
Image(uiImage: inputImage)
.resizable()
.scaledToFit()
}
Text(category.name ?? "")
}
.tag(category as CategoryItem?)
}
}
.font(.callout)
.pickerStyle(.menu)
As you can see in images 1 and 2 below, the image in the tag from the Beverages
category is huge and covers almost the entire screen, it also covers the category name (Beverages). Is there a way to remove or resize the image when displaying it on the tag? Basically to make it look like image #3.
Image Link:
https://i.stack.imgur.com/4XpjI.jpg