ios - CAAnimation 的 delegate 用 strong的原因是?
PHP中文网
PHP中文网 2017-04-17 17:44:20
0
1
835

IOS中,CAAnimation 这个类的 @property(nullable, strong) id delegate; 这个delegate用 strong的原因是?

PHP中文网
PHP中文网

认证0级讲师

reply all (1)
伊谢尔伦

Are you worried that the strong delegate will cause circular references? The situation here is different from the general delegate. First of all, the animation is asynchronous. During the animation process, its delegate may be released at any time. If it is not a strong reference, for example, the user clicks return. On the other hand, generally you don't hold a strong reference to a CAAnimation (unlike a UITableView). The documentation also says that this is an exception to the memory management rules.

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!