I'm targeting iOS7 and need to put a DTAttributedTextContentView
inside a table cell. I can't use a DTAttributedTextCell
because I also need to place some UILabel
s in the same cell, adjust it's indentation, and have other control.
I can't find any explicit sample code to do this, but I can see from SO questions that it's been done before. Do I hook something up in Interface Builder in a prototype cell? Do I create the DTAttributedTextContentView
programmatically?
The way to do it with Storyboards is to create a prototype cell with UILabels (and whatever other elements you want) and a UIView, and set the UIView's class to DTAttributedTextContentView
. Grab an IBOutlet reference to this DTAttributedTextContentView in a custom UITableViewCell class, and you can now set its attributed string property in your table view controller.