Objective C View to Controller Communication

后端 未结 5 943
滥情空心
滥情空心 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:35

    Make your view a subclass of UIControl and implement the target/action design pattern - use the sendActionsForControlEvents: method to message the controller.

提交回复
热议问题