ich meine UIActivityIndicator möchte nur starten, wenn die Aktion zu viel Zeit:Starten eines UIActivityIndicator nach einer Verzögerung auf ios
- (void) continueLaunch {
//operations
//.....
[activityIndic stopAnimating];
}
//my current method
- (void)lauchApplication {
[activityIndic startAnimating];
[self performSelector:@selector(continueLaunch) withObject:nil afterDelay:0.0f];
}
//what I want to do
- (void)lauchApplication {
if ([self performSelector:@selector(continueLaunch) withObject:nil afterDelay:0.0f]duration > 1 second){
[activityIndic startAnimating];
}
}
Wie kann ich das tun?