How to automate toggle buttons in appium?

Appium - iOS - Java

Hi,

I want to automate this toggle buttons in a iOS app with appium.

My script is in java. What should be the function for this?

i just tap on them to change. also i am reading it state (attribute “value”) before and after for sure that it changed to needed.