-(IBAction)addtocontacts:(id)sender
{
HUD = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
HUD.labelText = NSLocalizedString(@"Saving_data", @"");
//added my validation here
[self performSelectorInBackground:@selector(insertDetails) withObject:nil];
}
-(void) insertDetails
{
//save contact details in database
[HUD hide:YES];
UIAlertView *alertview=[[UIAlertView alloc]initWithTitle:@"" message:@"Contact account details added" delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
[alertview show];
}
我在savebutton点击添加了加载符号,但是没成功,怎么让符号出现,到了有警告信息时再消失?