我設置的位置,我UITextField
時UIKeyboardWillHideNotification
是像這樣的UITextField的setText復位位置
[chatTextField setFrame:CGRectMake(chatTextField.frame.origin.x, chatTextField.frame.origin.y - 250, chatTextField.frame.size.width, chatTextField.frame.size.height)];
解僱
然而,當我再打電話
[chatTextField setText: @""];
位置的UITextField
被設置回開始位置(在鍵盤下)。這也發生在UIWebView
同樣的看法。
爲什麼重置職位?我是否以不正確的方式設置了框架位置?
使用兩種UIKeyboardDidShowNotification和UIKeyboardWillHideNotification,不只是一個,檢測鍵盤存在。 – 2013-04-28 19:56:51