开发者

UIAlertViews disappear when calling UIActivityIndicatorView method

if I show an Alert and then call a method of an Ac开发者_开发知识库tivity Indicator, the alert disappears like the user has pressed OK.

Declaration of alert:

UIAlertView *errorAlert = [[UIAlertView alloc] initWithTitle:@"Error loading content" message:errorString delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
[errorAlert show];
[errorAlert release];

Declaration of Activity Indicator:

UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite];  
indicator.hidesWhenStopped = YES;  
[indicator stopAnimating];

Method call which causes this problem:

    [indicator stopAnimating];

What can I do?

Edit: I noticed that my app isn't working correct, if NSXML Parser is getting a wrong URL. At the moment I cannot say if the activity indicator is causing a error.


you could have the ActivityIndicator embedded in your alertview, looks neat and tidy: http://kwigbo.com/post/394670170/iphone-sdk-uialertview-with-activity-indicator

Edit: Re-read your question, above solution might not be suitable for your needs.

Let me ask, what exactly are you trying to do with those two views?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜