An attempt to implement a UITableView of names similar to the built-in iPhone application for contacts, where the first name has a normal font and the last name is in bold. A quick google suggests that it is not as simple as it seems due to the lack of iPhone SDK support in the UILabels library.
One of the solutions found was recommended using UIWebView for text formatting that allows highlighted bold HTML tags to provide the necessary markup. Correct me if I am wrong, but it seems to be too large, and this will affect application performance.
Another solution I'm trying to explore more is to create a custom UITableViewCell containing two UILabels side by side with a second label formatted for bold text. It seems simple, but I'm not sure how the labels would be automatically set horizontally to fit the text (up to a certain maximum width). Is this possible with Interface Builder or is it necessary to do this programmatically?
Am I on the right track here or is there a much simpler way to achieve this seemingly trivial effect?
source
share