xcodeをアップデートしてswift2からswift3にしたところ下記のコードでエラーが出てしまいます。
エラー名はtype "viewcontroller" has no member "handleKeyboardWillShowNotification"です。
archiveの時にエラーが出たためアップデートをすればなんとかなるかなと思ったのですが...
なんだか余計にわからなくなりました...
swift3
1 override func viewWillAppear(_ animated: Bool) { 2 super.viewWillAppear(animated) 3 4 let notificationCenter = NotificationCenter.default 5 notificationCenter.addObserver(self, selector: #selector(ViewController2.handleKeyboardWillShowNotification(_:)), name: UIKeyboardWillShowNotification, object: nil) 6 notificationCenter.addObserver(self, selector: #selector(ViewController2.handleKeyboardWillHideNotification(_:)), name: UIKeyboardWillHideNotification, object: nil) 7 } 8
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2016/11/03 09:57