开发者

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 UIImag开发者_JS百科eView 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.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜