Skip to content

Instantly share code, notes, and snippets.

@mogeta

mogeta/gist:2573805

Created May 2, 2012
Embed
What would you like to do?
performSelector:withObject:afterDelay recursive call
- (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
}
}
@mogeta

This comment has been minimized.

Copy link
Owner Author

@mogeta mogeta commented May 2, 2012

UIProgressViewを3秒かけて1にしたい。っていう処理を再起呼び出しするときにちょい手こずり。
afterDelayがうまく動かず。NSThreadで対処。autorelease的なことされてる?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment