Created
May 2, 2012 04:50
-
-
Save mogeta/2573805 to your computer and use it in GitHub Desktop.
performSelector:withObject:afterDelay recursive call
This file contains 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
- (void)advTimeKeeper:(NSNumber * )param{ | |
[NSThread sleepForTimeInterval:0.1]; | |
[self performSelectorInBackground:@selector(progress:) | |
withObject:[NSNumber numberWithFloat:[param floatValue]]]; | |
if([param floatValue]<1.0){ | |
[self performSelector:@selector(advTimeKeeper:) | |
withObject:[NSNumber numberWithFloat:([param floatValue]+0.03125)]]; | |
//not work afterDelay | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
UIProgressViewを3秒かけて1にしたい。っていう処理を再起呼び出しするときにちょい手こずり。
afterDelayがうまく動かず。NSThreadで対処。autorelease的なことされてる?