Rich Text Labels

  A label won’t take rich text so you have two choices, use a WebView or multiple labels styled as required. Don’t dismiss the idea of just using multiple labels, even labels over the top of text to highlight individual words.  It’s not pretty but it does work.  One really annoying gotcha of the webview […]

Read More

Labels As Links

UILabels don't have methods for triggering events when they are clicked so you can detect a click manually from the touch event In #ViewController.h IBOutlet UIView *mainView; IBOutlet UILabel *UrlLabel; In interface builder Right click Files Owner. Drag the mainView outlet onto the view. Drag the UrlLabel outlet onto the label In #ViewController.m to open […]

Read More

Labels General

Add Label View Object Declare in the .h IBOutlet UILabel *MyLabelName; Write To Label [MyLabelName setText:MyStringName]; [MyLabelName setText:@”Some Text?”]; Adding Value To A Label [SomeLabel setText:[NSString stringWithFormat:@”You currently have %d things”, SomeVariable]]; Label Colour SomeLabel.textColor = [UIColor colorWithWhite:0.5 alpha:1]; Multi Line Labels You can set the number of lines property to 0 for auto multi […]

Read More