Note that there are some explanatory texts on larger screens.

plurals
  1. POhandling two alertview
    primarykey
    data
    text
    <p>I am making an application where </p> <p>1) i show an alert view to accept or deny the call....</p> <p>2) But if the call is canceled from the caller itself then an alert is shown saying the call is cancelled by the caller.</p> <p>My problem is if the call is canceled before i accept it the alert view are stacked and on the closer of the alert view(2) i still can see the alert view(1) where as my requirement is to directly show the view on the closer of any of the alertview.</p> <p>i have created a method to generate alert view i give diff tags to the alertview</p> <blockquote> <p>-(void)generateMessage:(const char*)msg Title:(const char*)title withAcceptButton: (bool)doAddAcceptButton Tag:(int)tag{</p> <p>dispatch_async(dispatch_get_main_queue(), ^{</p> <pre><code> // We are now back on the main thread UIAlertView *alertView = [[UIAlertView alloc] &gt;init]; //add button if(doAddAcceptButton==true) { [alertView addButtonWithTitle:@"OK"]; [alertView addButtonWithTitle:@"Cancel"]; alertView.cancelButtonIndex=1; } else { [alertView addButtonWithTitle:@"OK"]; alertView.cancelButtonIndex=0; } //add tag [alertView setTag:tag]; //add title if(title==NULL) { [alertView setTitle:@"MESSAGE"]; } else { NSMutableString *head = [[NSMutableString &gt;alloc] initWithCString:title &gt;encoding:NSUTF8StringEncoding]; [alertView setTitle:head]; [head release]; } if(msg==NULL) { [alertView setMessage:@"ERROR"]; } else { NSMutableString *body = [[NSMutableString &gt;alloc] initWithCString:msg &gt;encoding:NSUTF8StringEncoding]; [alertView setMessage:body]; [body release]; } [alertView setDelegate:self]; [alertView show]; [alertView release]; }); </code></pre> <p>}</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload