Timer and progress bar (developed for IOS)
For more information, see note!
-(IBAction) startToMove :( id) sender {// determines whether the animation is being rotated. // The stopAnimating method indicates that the animation is stopped. if ([self. myActivityIndicatorView isAnimating]) {[self. myActivityIndicatorView stopAnimating];} else {[self. myActivityIndicatorView startAnimating] ;}}-(IBAction) downloadProgress :( id) sender {// timer method: after a specific interval, send a message to an object // target is the object to which the message is sent // timeinterval interval // method name to be called by the selector // userinfo to send the message // whether the repeats parameter of myT is repeated Expiration = [NSTimer scheduledTimerWithTimeInterval: 1.0 target: self selector: @ selector (download) userInfo: nil repeats: YES];}-(void) download {self. myProgressView. SS + = 0.1; // set the step length if (self. myProgressView. SS = 1.0) {// if the progress bar has reached the header // terminate the timer [myTimer invalidate]; // the pop-up dialog box UIAlertView * alert = [[UIAlertView alloc] initWithTitle: @ "download completed! "Message: @" Hey! Lucy! "Delegate: nil cancelButtonTitle: @" OK! "OtherButtonTitles: nil, nil]; [alert show] ;}}