Use different tags for two types of viewing.
alertView.tag = 1000;
Inject the delegate method of the alert view and check the tag value. When a delegate is called with the first warning view, create and show the second warning view.
- (void)alertView:(UIAlertView *)alertView didDismissWithButtonIndex:(NSInteger)buttonIndex
{
if(alertView.tag == 1000)
{
UIAlertView *view = [[UIAlertView alloc]
initWithTitle: @"Message"
message: @"limit already reached"
delegate: self
cancelButtonTitle: @"OK" otherButtonTitles: nil];
view.tag = 2000;
[view show];
}
if(alertView.tag == 2000)
{
}
}
lukya source
share