ChenYilong / ChenYilong/iOSInterviewQuestions

关于weak的一个问题

Open
#39 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Swift
Stars
9.5k
Forks
2.8k
PR merge metrics
No merged PRs in 30d

Description

![image](https://cloud.githubusercontent.com/assets/5186464/14669038/9d0d9922-0719-11e6-9496-eea13ab47350.png)

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.