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约束或大小有问题。确保标签的大小等于单元格的大小,限制是正确的 –