The clicked UITextFiled is moved out of the interface

Load cell in UICollectionViewController, cell is XIB hybrid development, there are UITextFiled. When you click UITextFiled, the keyboard pops up, the entire View moves up, the clicked UITextFiled is moved out of the interface. Seek help: There is no way to turn off the keyboard pop-up View automatically move up. Or who knows what's wrong with it?

在这里输入图像描述


-(void)viewWillAppear:(BOOL)animated {

} I found a solution: to implement this method and not call [super viewWillAppear:animated] can be solved.


You have to remember when you use TableViewController or CollectionViewController they get this behaviour automatically. You have to disable the autoscroll or you can add keyboard notification observer and re scroll the tableView back to where it was

Disabling automatic scrolling of UITableView

链接地址: http://www.djcxy.com/p/74222.html

上一篇: iPhone动画

下一篇: 点击的UITextFiled被移出界面