0
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let myCell = tableView.dequeueReusableCellWithIdentifier("myCell", forIndexPath: indexPath) as! UITableViewCell
myCell.textLabel?.text = searchResults[indexPath.row]
myCell.textLabel?.font = UIFont(name: "Lato", size: 18)
myCell.textLabel?.lineBreakMode = NSLineBreakMode.ByWordWrapping
myCell.textLabel?.numberOfLines = 0
return myCell
}
這是我利用改變我的細胞的視覺特性的代碼塊,我相信我應該得到換行/字包裹,但它減少不管。自動換行編程是不工作,因爲它應該
myCell.textLabel約束或大小有問題。確保標籤的大小等於單元格的大小,限制是正確的 –