您的位置:首页 > 产品设计 > UI/UE

[iOS]UITableViewController 无法实现键盘自动适配

2015-08-13 14:14 417 查看
苹果官方文档:The
UITableViewController
class
implements the foregoing behavior by overriding
loadView
,
viewWillAppear:
,
and other methods inherited from
UIViewController
.
In your subclass of
UITableViewController
,
you may also override these methods to acquire specialized behavior. If you do override these methods, be sure to invoke the superclass implementation of the method, usually as the first method call, to get the default behavior.意思是写UITableViewController的时候,重写UITableViewController loadView,
viewWillAppear 的时候,必须 要调用实现父类方法
-(void)viewWillAppear:(BOOL)animated
{
    //不加会导致无法使用父类的一些特性
    [super viewWillAppear:YES];
    
    
    if(!_imgFlag&&!_emailSaveFlag&&!_phoneSaveFlag)
    {
        [self getperspnInfo];
    }
}

- (void)viewDidLoad {
    [super viewDidLoad];}
如果你出现了UITableViewController 无法自动适配键盘 请检查
重写方法时是否调用了父类的一些方法特性
[super
viewWillAppear:YES];
[super viewDidLoad];

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: