Skip to content
New issue

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

第30题,使用dispatch source替换NSTimer #45

Open
MrBoog opened this issue May 31, 2016 · 1 comment
Open

第30题,使用dispatch source替换NSTimer #45

MrBoog opened this issue May 31, 2016 · 1 comment

Comments

@MrBoog
Copy link

MrBoog commented May 31, 2016

可以不使用nstimer或者cadisplaylink这些需要加入runloop的定时器,使用GCD dispatch source timer替换。而且这个NSRunLoopCommonModes 是合集,也不用先加入default吧,只加入NSRunLoopCommonModes就行。

@DivvSpace
Copy link

直接添加到NSRunLoopCommonModes里不行吗?先加到NSDefaultRunLoopMode再加到NSRunLoopCommonModes,相当于有两个timer在同时调用了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants