草庐IT

registerForKeyboardNotifications

全部标签

ios - Swift:来自 UIViewController 扩展的 registerForKeyboardNotifications

我正在尝试清理我的代码并创建和扩展UIViewController以注册和取消注册我的键盘。在我的实用程序文件中,我有以下内容:extensionUIViewController{//RegisterthekeyboardfornotificationsinviewDidLoadfuncregisterForKeyboardNotifications(){//AddingnotifiesonkeyboardappearingNSNotificationCenter.defaultCenter().addObserver(self,selector:#selector(CreateEve