0
如何根據textLabel的長度自動調整每個單元格的高度?理想情況下,我希望textLabel也能被包裝,所以textLabel可以使用它所需的多條線。下面的代碼是什麼我目前:Swift iOS自動爲UITableViewCell調整高度UILabel()
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let notification = self.fetchedTweetsArray[indexPath.row]
let cell = UITableViewCell()
cell.textLabel?.text = notification
return cell
}
你在使用autolayout嗎? – ivarun
未使用自動佈局 –