0

I have already running UIAlertView, But during Getting data from Webservice i want to update Message of that AlertView. So I write below Code to update message of alert:

[self performSelectorOnMainThread:@selector(UpdateAlertMessage:) withObject:@"Downloading Schedule ..." waitUntilDone:NO];

-(void)UpdateAlertMessage:(NSString *)strMessage
{appDelegate.progressAlert.message=strMessage;
}

Here progress alert is my already running alertview.

But I give me below warning in Console:

wait_fences: failed to receive reply: 10004003

I want to remove that warning. Any Help??

βhargavḯ
  • 9,786
  • 1
  • 37
  • 59
Divya Jain
  • 119
  • 1
  • 1
  • 9

1 Answers1

0

You are doing it on Main thread so try to use GCD method instead of [self performSelectorOnMainThread:@selector(UpdateAlertMessage:) withObject:@"Downloading Schedule ..." waitUntilDone:NO];

like this

dispatch_async(dispatch_get_main_queue(), ^{ 
  [self UpdateAlertMessage:@"Downloading Schedule ..."];
});

UPDATE

dispatch_queue_t myQueue;
myQueue = dispatch_queue_create("myQueue", NULL);
dispatch_sync(myQueue, ^{
    [self UpdateAlertMessage:@"Downloading Schedule ..."];
});
βhargavḯ
  • 9,786
  • 1
  • 37
  • 59