Subclass of UIViewController is released immediately

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.


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.)

链接地址: http://www.djcxy.com/p/87758.html

上一篇: 如何向上移动UIViewcontroller(StoryBoard)中的模态UIView

下一篇: UIViewController的子类立即释放