0

I use Material pod library for adding radioButton to iOS app. but it has an issue in right to left languages. it's label shows on right and I wondering if there is a way to put its label to left of radioIcon. here is my code:

    rdGroup = RadioButtonGroup()
    
    let rd1 = RadioButton()
    rd1.title = "My Right to left title"
    rd1.isSelected = true
    rdGroup!.buttons.append(rd1)
    
    let rd2 = RadioButton()
    rd2.title = "My Right to left title"
    rdGroup!.buttons.append(rd2)
Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52

1 Answers1

1

After browsing source code of Material I found out that it's a Button. Then should just use this:

rd1.semanticContentAttribute = .forceRightToLeft
rd1.contentHorizontalAlignment = .left

on each radioItem.

happy coding ;)

Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52