How to judge element is selected or not on iOS using Appium

on android, there an attributed like checked is true or false, but on ios, there are no such element attribute, what i would like to do is judge the element is selected or not, if unselected, then select it, how to resolve it?