純屬個人記錄
習慣在xib中使用autolayout,要實現tableViewCell自適應只需兩句代碼:
self.tableView.estimatedRowHeight = 80.0 //設置一個默認高度
self.tableView.rowHeight=UITableViewAutomaticDimension ?//開啟自適應
純屬個人記錄
習慣在xib中使用autolayout,要實現tableViewCell自適應只需兩句代碼:
self.tableView.estimatedRowHeight = 80.0 //設置一個默認高度
self.tableView.rowHeight=UITableViewAutomaticDimension ?//開啟自適應