AVPlayer 监听播放时长错误capturing 'self' strongly in this block is likely to lead to a retain cycle 的解决方法

来源:互联网 发布:淘宝云客服多久结工资 编辑:程序博客网 时间:2024/06/05 05:31
__weak typeof(self) weakSelf = self;    /* Update the scrubber during normal playback. */[weakSelf.player addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(interval, NSEC_PER_SEC)                                                                queue:NULL /* If you pass NULL, the main queue is used. */                                                           usingBlock:^(CMTime time)                      {                          [self syncScrubber];                      }];


连接:https://www.google.com.hk/search?q=capturing+%27self%27+strongly+in+this+block+is+likely+to+lead+to+a+retain+cycle&oq=capturing+%27self%27+strongly+in+this+block+is+likely+&aqs=chrome.1.69i57j0l5.13939j0j7&sourceid=chrome&espv=210&es_sm=119&ie=UTF-8

0 0
原创粉丝点击