xib_cell布局适配高度

1.修改tableView的属性

   //行高自动检测
    self.tableView.rowHeight = UITableViewAutomaticDimension;
    //设置行高预估值
    self.tableView.estimatedRowHeight = 44;

 

//加载xib视图或直接注册xib cell自定义表格

 cell = [[[NSBundle mainBundle] loadNibNamed:@"TweetCell" owner:self options:nil] firstObject]; 

 

2.AutoLayout布局高度

某些文本无法全部显示时,设置

 

posted @ 2015-09-01 10:55  Caolongs  阅读(149)  评论(0编辑  收藏  举报