Created
April 8, 2015 08:41
-
-
Save tkoki/4bc9ec288d5191696459 to your computer and use it in GitHub Desktop.
GCDでの遅延実行パターン
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double delayInSeconds = 1.0; // 遅延時間 | |
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(delayInSeconds * NSEC_PER_SEC)); | |
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){ | |
// ここに遅延実行したい処理を記述。 | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment