Do I need to release xib resources?

后端 未结 8 981
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-04 08:40

If I have something like a UILabel linked to a xib file, do I need to release it on dealloc of my view? The reason I ask is because I don\'t alloc it, which makes me think I

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-04 09:12

    I found what I was looking for in the Apple docs. In short you can set up your objects as properties that you release and retain (or just @property, @synthesize), but you don't have to for things like UILabels:

    http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/LoadingResources/CocoaNibs/chapter_3_section_4.html#//apple_ref/doc/uid/10000051i-CH4-SW18

提交回复
热议问题