Add Checkbox List to UIAlertController

后端 未结 1 1707
清歌不尽
清歌不尽 2021-01-28 09:58

I am working with the UIAlertController.

Right now I am able to list an item from the following code:

{
  UIAlertController *controller          


        
相关标签:
1条回答
  • 2021-01-28 10:35

    What you had shown in the picture is complicated and cannot be implemented with a simple UIAlertController.

    In order to replicate your screenshot what you need is

    • Learn how to show a ViewController as a pop-up
    • Add UITable to a ViewController
    • Show items in a UITable
    • Customize the UITable by adding custom cells
    • In each of the custom cells add a button
    • That button will have two kinds of images, one blank box and the other box with a check mark
    • when user touches a table cell you need to change the button image corresponding to that table row so the user thinks they are checking or unchecking the box
    • and lastly add a done button at the bottom to dismiss the viewcontroller

    Google all these items for tutorials. As I said this is not a simple task as there is no out of the box check mark function in Xcode.

    0 讨论(0)
提交回复
热议问题