2

Can anybody provide me a with a simple example showing the creation of a UILabel that has both bold and plain text in the single label?

I have searched around and managed to piece together something that dramatically modifies a UILabel's look, but I can't figure out how to change only parts of the label...

Surely it can't be this difficult? I imagine I would need to create a UILabel, use NSAttributedString text, and specify an NSRange to say which parts of it I want to be bold?

To clarify, I am using MonoTouch.

Shogan
  • 1,154
  • 1
  • 10
  • 24

1 Answers1

2

Something like this, although you'll need to use a more complicated set of attributes for NSAttributedString

label.AttributedText = new NSAttributedString (
    "Label", 
    underlineStyle: NSUnderlineStyle.Single);
Jason
  • 86,222
  • 15
  • 131
  • 146