私はUIAlertview
その 1 つのアクティビティ インジケーター内で使用しviewdidload()
ています。しかし、遅延後にスーパービューから削除しようとしましたが、UIAlertview
次のコードを使用して削除した後、アプリで何もできません。新しい透明なレイヤーがまだ私の上で実行されているようです。見る。
コード
-(void)startAlertActivity
{
_alertView = [[UIAlertView alloc] initWithTitle:@"Loading "
message:@"\n"
delegate:self
cancelButtonTitle:nil
otherButtonTitles:nil];
spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
spinner.center = CGPointMake(139.5, 75.5); // .5 so it doesn't blur
[_alertView addSubview:spinner];
[spinner startAnimating];
[_alertView show];
[_alertView performSelector:@selector(stopAlertActivity) withObject:self afterDelay:5.0];
}
-(void)stopAlertActivity
{ [spinner stopAnimating];
[_alertView dismissWithClickedButtonIndex:0 animated:YES];
}
ITS はまだ画面上で実行されている透明なレイヤーのように見えます。どうすればそれを閉じることができますか?
例の画像....
私にとって、アラートは現在画面に表示されていませんが、背景は水色です
クラッシュレポート
[UIAlertView stopAlertActivity]: unrecognized selector sent to instance 0x9ab5eb0
2013-08-02 12:20:43.822 AssamKart[5719:12203] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIAlertView stopAlertActivity]: unrecognized selector sent to instance 0x9ab5eb0'
*** First throw call stack: