We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
感觉_timerOverflow是不是可以省掉啊,直接在resumeTimerWithDelay函数里面用[_timerLoop setFireDate:[NSDate dateWithTimeIntervalSinceNow: _durationOfScroll]]来设定下次的触发时间?
_timerOverflow
resumeTimerWithDelay
[_timerLoop setFireDate:[NSDate dateWithTimeIntervalSinceNow: _durationOfScroll]]
The text was updated successfully, but these errors were encountered:
谢谢你的提议, 但是这个我试过, 同一个作用域里不能设自两次FireDate, 后面设的无效, 所以会用了两个定时器控制, 当然, 如果你还有更好的做法, 随时通知我
Sorry, something went wrong.
我测试了下你说的问题,连着调用2次,比如:[self.timer setFireDate:[NSDate distantFuture]]; [self.timer setFireDate:[NSDate dateWithTimeIntervalSinceNow:3]];,后面设置的会生效的,3s后就触发了。不知道你指的是这样吗?
[self.timer setFireDate:[NSDate distantFuture]]; [self.timer setFireDate:[NSDate dateWithTimeIntervalSinceNow:3]];
如果你多次触发这个逻辑, 会一直启动timer的, 不知道你有没有在项目demo里面调试过, 我一直滑动去调试, 过了几秒之后, scrollview会连续滚动多次, 你可以在我的demo里替换试试看
No branches or pull requests
感觉
_timerOverflow
是不是可以省掉啊,直接在resumeTimerWithDelay
函数里面用[_timerLoop setFireDate:[NSDate dateWithTimeIntervalSinceNow: _durationOfScroll]]
来设定下次的触发时间?The text was updated successfully, but these errors were encountered: