Checkbox in iOS application

前端 未结 13 1427
野趣味
野趣味 2020-12-01 01:48

I need to add checkbox controls to my form. I know that there is no such control in iOS SDK. How could I do this?

13条回答
  •  醉梦人生
    2020-12-01 02:29

    If you're showing a group of options and the user can select one of them, use a tableview with a checkmark accessory and a different text color on the selected row.

    If you have a single option, your best bet is to use a switch. If you can't or don't want to, use a button, setting the normal image to an empty box and the selected image to a checked box. You'll have to make those two images yourself or find stock graphics to use for them.

提交回复
热议问题