2013-01-18 45 views

回答

0

嘗試下面的代碼,但我給例子中,你應該根據自己的需要修改它&使用:

alert= [[UIAlertView alloc] initWithTitle:@"Loading\nPlease Wait..." message:nil delegate:self cancelButtonTitle:nil otherButtonTitles: nil]; 
       [alert show]; 

       UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; 

       indicator.center = CGPointMake(150, 100); 
       [indicator startAnimating]; 
       [alert addSubview:indicator]; 

好推類使用此行解僱指標後:

[alert dismissWithClickedButtonIndex:0 animated:YES]; 

嘗試。祝你好運。

相關問題