Hello,
I have a problem for SegmentedPickerStyle-Picker using Images. Default style is ok, but scaledToFit does not work in SegmentedPickerStyle.
Do I have something to do?
Thanks.
I have a problem for SegmentedPickerStyle-Picker using Images. Default style is ok, but scaledToFit does not work in SegmentedPickerStyle.
Do I have something to do?
Thanks.
Code Block Swift Picker(selection: $selection, label: EmptyView()) { Image("image0") .resizable() .scaledToFit() .tag(0) Image("image1") .resizable() .scaledToFit() .tag(1) } .pickerStyle(DefaultPickerStyle()) //.pickerStyle(SegmentedPickerStyle())
Well, you did not say what the exact problem was. I thought you did not see the image, in fact it is not displayed properly.
In fact it appears that scaleToFit does nothing !
https://stackoverflow.com/questions/59635519/swiftui-picker-segmentedstyle-image-bad-display
Should file a bug report.
Note: that is the same problem than in UIKit TabBar icons. You have to manually size the image before using.
Thanks to note the FB reference if you file a bug report. And don't forget to close the thread.
In fact it appears that scaleToFit does nothing !
https://stackoverflow.com/questions/59635519/swiftui-picker-segmentedstyle-image-bad-display
Should file a bug report.
Note: that is the same problem than in UIKit TabBar icons. You have to manually size the image before using.
Thanks to note the FB reference if you file a bug report. And don't forget to close the thread.