If you are using a storyboard, you should also implement initWithCoder:
.
When a storyboard is being loaded, a decoder is used to create objects defined in the storyboard. initWithCoder:
comes from the NSCoding
protocol, and is a way for classes to deserialize themselves from coders. You can read about it in detail here.
If you wish to support both nibs and storyboards, there is a method available you can implement in your views, awakeFromNib
.