本文共 1002 字,大约阅读时间需要 3 分钟。
-(IBAction)DoneEdting:(id)sender { //创建并显示无按钮警告框 baseAlert=[[[UIAlertView alloc]initWithTitle:@"数据上传中,请稍候" message:nil delegate:self cancelButtonTitle:nil otherButtonTitles:nil] autorelease]; [baseAlert show]; //创建活动进度轮,并添加到无按钮警告框 UIActivityIndicatorView *aiv=[[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; aiv.center=CGPointMake(baseAlert.bounds.size.width/2.0f, baseAlert.bounds.size.height-40.0f); [aiv startAnimating]; [baseAlert addSubview:aiv]; [aiv release]; //延迟3秒后关闭对话框,这里可根据应用程序合理设置 [self performSelector:@selector(performSelector:) withObject:nil afterDelay:3.0f]; } //关闭警告框 -(void)performDismiss { [baseAlert dismissWithClickedButtonIndex:0 animated:NO]; }