Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何将字符串分配为单元格的附件视图而不是UIImageView?
UIImageView
谢谢!
字符串不是视图。也许你想显示一个UILabel?
UILabel
该accessoryView属性是 a UIView,因此您可以为其分配任何子UIView类。
accessoryView
UIView
cell.accessoryView = myLabel会工作得很好。
cell.accessoryView = myLabel