所以在我的应用程序中,我添加了ActiveLabel,我想在我的TableView上使用它。
因此在TableView上设置文本我可以这样做:
cell.textLabel?.text = commentsArray[commentsArray.count - 1 - indexPath.row]
或者这个:
cell.textLabel?.text = commentsArray[commentsArray.count - 1 - indexPath.row] as? String
但是如何将cell.textLabel.text从UILabel更改为ActiveLabel?
答案 0 :(得分:0)
您需要create custom UITableViewCell并插入ActiveLabel
作为子视图。 (注意:如果您在storyboard / XIB中创建UITableViewCell,请确保为您的标签选择了正确的类。)