Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在阅读 BNR 第 3 版,它说默认情况delegate下unsafe unretained不是weak为了向后兼容。我想知道最新版本的 Xcode 是否仍然如此,因为没有多少人拥有旧的 iOS 版本了?
delegate
unsafe unretained
weak
iOS 5.0 及更高版本支持委托归零。如果您的目标是 5.0 或更高版本,请使用weak.
代表什么?由于各种原因,系统中的许多类仍然会有不安全的未保留委托。您的课程可能应该有较弱的课程。