对不起中文字符,但UILabel文本对齐显示为右侧无关项设置了哪个选项(左侧,中间等)。请帮忙。
// This is the function that populates the cell
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: identifier, for: indexPath) as! WordLibraryTableViewCell
let key = Int(dataSource[indexPath.section][indexPath.row])
let value = levelDict[key!]! as String
cell.wordLibLabel.text = value
return cell
}
// This is the cell class
class WordLibraryTableViewCell: UITableViewCell {
@IBOutlet weak var bookimageView: UIImageView!
@IBOutlet weak var wordLibLabel: UILabel!
}