Xcodeの最近の更新後、このコードは機能しなくなりました。セレクター(「:」)のほとんどは、このコードの例外を除いて自動修正を持っていますNo Objective-Cで通知されるメソッド通知UIKeyboardWillShowNotificationおよびUIKeyboardWillHideNotificationのセレクタ
override func viewDidLoad() {
super.viewDidLoad()
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillShow:"), name:UIKeyboardWillShowNotification, object: nil);
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector("keyboardWillHide:"), name:UIKeyboardWillHideNotification, object: nil);
}
たフラグエラー:
No method declared with Objective C selector 'keyboardWillSHow:'
この画像を表示すべて失敗しているさまざまな試み。
このコードのための新しい構文は何ですか?
Sohilに感謝します。できます –