Class UILabel

A UILabel is a specialized type of UIView. In other words, class UILabel is a subclass of class UIView. A UILabel is specialized for holding and displaying one line of text. It can display the line without the call to drawAtPoint:withFont: in drawRect: that we saw here. In fact, it can display the line without any drawRect: method at all.

iOS 6: the data type of the textAlignment property has changed from UITextAlignment to NSTextAlignment.

Source code in

  1. main.m
  2. Class LabelAppDelegate
  3. Class View