Autolayout调整frame后,会自动拉伸和收缩SupView。
在TableViewController里
- (void)viewDidLoad {
[super viewDidLoad];
//添加这两行代码
self.tableView.estimatedRowHeight = 44.0f;
self.tableView.rowHeight = UITableViewAutomaticDimension;
}
自动布局搞定Autolayout调整frame后,会自动拉伸和收缩SupView。
在TableViewController里
- (void)viewDidLoad {
[super viewDidLoad];
//添加这两行代码
self.tableView.estimatedRowHeight = 44.0f;
self.tableView.rowHeight = UITableViewAutomaticDimension;
}
自动布局搞定