[iOS]UITableViewController 无法实现键盘自动适配
2015-08-13 14:14
417 查看
苹果官方文档:The
implements the foregoing behavior by overriding
and other methods inherited from
In your subclass of
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:YES];
[super viewDidLoad];
UITableViewControllerclass
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];
相关文章推荐
- Arduino ESP8266 做Station模式连接路由器&服务器。基础模型
- iOS中storyboard故事板使用Segue跳转界面、传值
- BlockingQueue
- EasyUI datebox日期输入框--设置当前以后的时间不可用
- Uiautomator——实例分析信息应用的操作
- java中的break和continue关键字使用总结
- deque双端队列容器
- UI_Menu_Options Menu
- 使用druid连接池,配置sql防火墙发现的sql注入问题
- serivalVersionUID的作用
- PAT 1062. Talent and Virtue (25)
- iOS学习之UILable上显示不同的字体和颜色
- CAShapeLayer与UIBezierPath绘制图形
- iOS开发问题——UITextField弹出PickerView方法
- POJ 3017 Cut the Sequence
- 关于限定UITextField的字长
- java并发编程--AbstractQueuedSynchronizer加锁和解锁分析(二)
- 22个值得收藏的android开源代码-UI篇
- java并发编程--AbstractQueuedSynchronizer公平锁和非公平锁分析(三)
- java并发编程--AbstractQueuedSynchronizer条件锁分析(四)