iPhone toggle button implementation

前端 未结 7 1973
孤独总比滥情好
孤独总比滥情好 2021-02-04 09:05

I would like to create a toggle button in my iPhone application. However, I don\'t know exactly what would be the best approach for this.

I am considering two options.

7条回答
  •  一个人的身影
    2021-02-04 09:35

    You can use UIButton and set its enabled property.

    In Interface Builder, you can set separate images for the enabled and disabled states, and the IBAction change the property.

提交回复
热议问题