相关疑难解决方法(0)

在这个区块中强烈捕获自我可能会导致保留周期

如何在xcode中避免此警告.这是代码片段:

[player(AVPlayer object) addPeriodicTimeObserverForInterval:CMTimeMakeWithSeconds(0.1, 100)
queue:nil usingBlock:^(CMTime time) {
    current+=1;

    if(current==60)
    {
        min+=(current/60);
        current = 0;
    }

    [timerDisp(UILabel) setText:[NSString stringWithFormat:@"%02d:%02d",min,current]];///warning occurs in this line
}];
Run Code Online (Sandbox Code Playgroud)

cocoa-touch objective-c retain avplayer automatic-ref-counting

205
推荐指数
5
解决办法
8万
查看次数