Closed yto1 closed 1 year ago
[UIView (VAP) hwd_didFinishDisplay]中的判断条件 if (currentCount == -1 || currentCount-- > 0){} 。currentCount-- > 0,相当于先currentCount > 0, 再currentCount--。当currentCount=1时,currentCount-- > 0是YES,所以会执行判断条件中的代码再次播放。
这里函数参数命名是repeat,所以设置1的话,说明是要重复1次,也就是2次播放。
[UIView (VAP) hwd_didFinishDisplay]中的判断条件 if (currentCount == -1 || currentCount-- > 0){} 。currentCount-- > 0,相当于先currentCount > 0, 再currentCount--。当currentCount=1时,currentCount-- > 0是YES,所以会执行判断条件中的代码再次播放。