Hi all,
my purpose is to display a UITableView with cells with a style like:
TextA - bold text with a big font size
TextB - bold text with a small font size
TextC - normal text with the same font size of TextB
The UITableViewCellStyleSubtitle style is almost perfect, I could set TextA as textLabel and a string that contains TextB and TextC as detailTextLabel with numberOfLines equal to 2. But in this way TextB and TextC have the same font-weight.
I've seen that NSAttributedString is now supported, it's good because my application will be in any case only iOS 4 compliant and I've tried to code a styled label with CoreText API.
But the problem is that detailTextLabel is a readonly property.
The only thing that came to mind is to add the custom label written in CoreText as subview (with addSubview message) to the contentView of UITableViewCell objects.
Alternately I could create two UILabel and add them as subviews of cells.
Is there a more elegant way than add as subviews?