2017年3月7日 星期二

自適應Cell

1. 啟動自適應 Cell

viewDidLoad
     tableView.estimatedRowHeight = 36.0
     tableView.rowHeight = UITableViewAutomaticDimension

2. 設定 Label 顯示行數

     Lable → Lines:0

3. 設定 AutoLayout

     Cell → 設定 AutoLayout

沒有留言:

張貼留言