Objective C View to Controller Communication

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

    Often the UIKit objects like UITextField have delegate methods that you can implement to perform your business logic. E.g UITextField has a delegate method called - textFieldDidEndEditing: that gets called after the user has dismissed the keyboard.

提交回复
热议问题