0
iOS 4.3 이상 및 automatic reference counting
용 앱을 쓰고 있습니다. AVPlayer
을 사용하여 재생되는 동영상을 가지고 있으며 CMTime
에 도달하면이 동영상을 일시 중지하고 싶습니다. 현재 addBoundaryTimeObserverForTimes
을 사용 중이며 block
내부에있는 AVPlayer
을 일시 중지하고 있습니다. 그것은 작동하지만 오류가 나타납니다주어진 CMTime에서 AVPlayer 일시 중지
Capturing 'self' strongly in this block is likely to lead to a retain cycle
내 코드 :
는timeObserver = [player addBoundaryTimeObserverForTimes:endTime //An array of one NSValue representing a CMTime
queue:NULL
usingBlock:^{
[player pause];
}];
내가이 일을 올바른 방법을 작동하지 않을 수 있으며, 어떤 도움에 매우 감사하게 될 것입니다.
감사합니다.
감사 weichsel을. 당신의 대답이 내 경우에 효과가 있을지 모르겠습니다 ... iOS 4.3에서 __weak을 사용할 수 있습니까? 어쨌든 당신이 제공 한 링크로 덮여 있으므로 고마워요! – Simple99