我的swift APP有问题。Swift:如何居中细胞文本
在我TableViewCell功能我写
let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath:indexPath) as MyCell
cell.setMyCell(self.data[0]["content"]!)
如果我写
cell.textAlignment red line appear and say "textAlignment in unavailable: API deprecated"
大概你在你的单元格上有一个标签,并且你想对齐标签中的文本,而不是整个单元格... – Wain
您是否阅读过'UITableViewCell'的textAligment文档:“Deprecation Statement instead instead分配给textLabel和detailTextLabel属性的UILabel对象的文本对齐。“将这个对齐应用到想要的'UILabel',而不是单元格。 – Larme
我没读过。感谢您的意见。我解决它。 –