How to pass data from child to parent view controller? in swift

前端 未结 5 727
攒了一身酷
攒了一身酷 2020-12-16 02:05

I created an activity where when one of the text fields clicked it will pop up a child(alert dialog) with list of product but when i click one item on the list I can\'t disp

5条回答
  •  借酒劲吻你
    2020-12-16 02:18

    There are few ways by which you can implement the callback functionality to pass data.

    • Delegate
    • Using Block CallBack
    • Post Notification

    But I would suggest to use delegate which is best way, Post Notification is also a way but I do not want to prefer.

提交回复
热议问题