最正规的办法,用通知
step 1:
在进入视图的时候添加监视:(viewDidLoad什么的)
step 2:
在键盘动作的时候移动视图:
step 3:
在退出视图的时候注销通知
viewDidUnload:
dealloc:
这些代码是摘自apple sample code KeyboardAccessory.
些许细节自己修改下就好了,比如那个textView
step 1:
在进入视图的时候添加监视:(viewDidLoad什么的)
复制代码
|
step 2:
在键盘动作的时候移动视图:
复制代码
|
step 3:
在退出视图的时候注销通知
viewDidUnload:
复制代码
|
dealloc:
复制代码
|
这些代码是摘自apple sample code KeyboardAccessory.
些许细节自己修改下就好了,比如那个textView