Should IBOutlets be strong or weak under ARC?

后端 未结 11 2168
自闭症患者
自闭症患者 2020-11-22 01:52

I am developing exclusively for iOS 5 using ARC. Should IBOutlets to UIViews (and subclasses) be strong or weak?

11条回答
  •  故里飘歌
    2020-11-22 02:34

    I think that most important information is: Elements in xib are automatically in subviews of view. Subviews is NSArray. NSArray owns it's elements. etc have strong pointers on them. So in most cases you don't want to create another strong pointer (IBOutlet)

    And with ARC you don't need to do anything in viewDidUnload

提交回复
热议问题