Objective C View to Controller Communication

后端 未结 5 944
滥情空心
滥情空心 2021-01-29 04:54

What is the proper way to accept user input in a view and then transfer it to that view\'s controller? I know the NotificationCenter is one option, but surely there is a more el

5条回答
  •  一个人的身影
    2021-01-29 05:12

    You are looking for delegation, where the controller set itselfs as the delegate of the view. You know it from UITableViewDelegate.

提交回复
热议问题