I'd like to format text in my application's UITableView, like App开发者_开发技巧le did in the iPhone's Contact application.
Basically last name is bold, and first name is not.
Is there a clean and simple way of accomplishing this?
Add separate UILabels to your cell's contentView, and format the text in each one of them accordingly.
You could add a subclassed UIView to your cell, or just use the subclassed cell, and in drawRect, go ahead and draw your text with all the formatting you require. Again, you will have to calculate where the first and last name go in relation to each other.
精彩评论