iOSInterviewQuestions icon indicating copy to clipboard operation
iOSInterviewQuestions copied to clipboard

关于weak的一个问题

Open WenchaoD opened this issue 8 years ago • 0 comments

image

关于这个题,应该不需要探究这么深,比如viewController对self.view是strong引用,view对subviews数组是strong,而数组NSArray对里面的元素也是strong,因此viewController对self.view的所有subview都已经存在strong引用了,因此即使非IB,添加子view也可以weak。跟是否IB没啥关系了

WenchaoD avatar Apr 20 '16 09:04 WenchaoD