Reputation: 417
I know this is a silly doubt but I just want to make sure before I implement in this project. Please help....I have a NSDictionary with a string object in it. String is concatenated with 4fields. I am trying to display this string on the Detail View Controller in UITableView on iphone.
For example my String is formatted as follows:
MR. ZZZ XXX TTT RRR HHH
Now when I am displaying the above string I want the first line to be in bold and the rest of the lines in Italic fonts. As this is a NSDictionary of strings I tried to use string method to get the index of the string but in my case the position keeps on changing as these values are coming from the database.
I will be waiting for ur replies..please..
Upvotes: 0
Views: 207
Reputation: 243156
Couple ideas, since there is no single UIKit control that can display multiply-styled text natively:
UIWebView
UILabel
objects: the first one is bolded, and the second one is italicized.UIView
subclass that uses the CoreText framework to draw the stylization yourselfI recommend #2, followed by #1, with #3 being "do this if you're a masochist".
Upvotes: 1