Still trying to update the message in UIAlertview while it is active. I removed most of the first part of the question and posted more code in the update below.
UPDATE 3: adding more code! In the .h file, I declare the following (among other things):
@interface WebViewController : UIViewController <UIWebViewDelegate> { IBOutlet UIWebView *webView; UIAlertView *alert; }
I @property and @synthesize UIAlertview for.
Next, I create a warning in IBAction, which is triggered by clicking a button:
-(IBAction)convert { convertButton.enabled = NO; mailButton.enabled = NO; backButton.enabled = NO;
Then it proceeds to the following function:
- (void)didPresentAlertView:(UIAlertView *)progressAlert { //A lot of code [alert setMessage:@"Checking history"]; //more code [alert setMessage:@"writing history"]; //even more code [alert setMessage:@"converting roster"]; }
The didPresentAlertView method ends with ASIHTTPRequest sending data to the web page, and when this request is completed, the code finally goes to the last exit method from UIAlertView and closes everything:
- (void)requestFinished:(ASIHTTPRequest *)request { [timer invalidate]; [alert dismissWithClickedButtonIndex:0 animated:YES]; backButton.enabled = YES; [alert release]; }
I also removed the auto-advertisement from my UIAlertView init to make sure it exists during the rest of the process.
As it is now, the code runs only the very first setMessage -> "get list" and the very last -> "convert list". SetMessage requests in the middle do not work.
Hope someone can help me here!
Thanks everyone!
source share