IOSbug

UITableViewController使用问题

2016-06-24  本文已影响97人  司马捷

UITableViewController 已经封装了当Cell中有UITextField.点击UITextField进行编辑的时候,会自动滚动,防止键盘遮挡.
但是UItableViewController 中的tableView是Plain,如果我们需要一个Group类型的UItablview.还想要它封装的这种特性.
可以使用

self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, KSrceenWidth, KSrceenHeight-40) style:UITableViewStyleGrouped];

对tableView进行替换.

上一篇下一篇

猜你喜欢

热点阅读