0
votes

Subclassing UIViewController I have UIView within NIB file then add "Object" with Custom Class named CustomViewController, this class have view property connected to the UIView from NIB file and other IBOutlet UIImageView connected within Interface Builder.

My question if why this class is loaded from NIB (initWithNibName is called) and is released immediately.

1

1 Answers

0
votes

Everything loaded in a nib is autoreleased. If you don't explicitly retain it, or connect it to an IBOutlet property with retain stated in the property definition, it will go away. (And usually make you unhappy.)