Fix for newer version of iOS
The last fix broke the newer versions of iOS so I've added a fix that should allow both version to function.
This commit is contained in:
parent
a0a193b040
commit
9ed6e8c72c
|
@ -1,6 +1,6 @@
|
|||
# SwiftletRadioButtonPicker for Swift and SwiftUI
|
||||
|
||||
      
|
||||
      
|
||||
|
||||
Creates a cross-platform Radio Button Picker that allow the user to select from a small group of options by presenting a list of `SwiftletRadioButton` objects that the user can tap on to select one items from the list.
|
||||
|
||||
|
|
|
@ -148,9 +148,15 @@ public struct SwiftletRadioButtonPicker: View {
|
|||
/// - Returns: The View for the `SwiftletRadioButton`.
|
||||
private func radioButton(_ button:SwiftletRadioButton) -> some View {
|
||||
HStack {
|
||||
#if swift(>=5.5)
|
||||
Image(systemName: (button.isSelected) ? selectedSymbolName : unselectedSymbolName)
|
||||
.resizable()
|
||||
.frame(width: selectorSize, height: selectorSize)
|
||||
#else
|
||||
Image(systemName: (button.isSelected) ? selectedSymbolName : unselectedSymbolName)
|
||||
.resizable()
|
||||
.frame(width: CGFloat(selectorSize), height: CGFloat(selectorSize))
|
||||
#endif
|
||||
|
||||
Text(button.name)
|
||||
|
||||
|
|
Loading…
Reference in New Issue