Closed masterrr closed 11 years ago
If I have a lot of alert views, I tag them to identify properly in controller delegate method. We need to create more comfortable way to do it (pass a tag in the delegate method, put some methods so users can tag buttons, etc?)
Here is how I do it now
Creating alert view(s)
-(void)makeAlert:(NSIndexPath*)indexPath { CustomIOS7AlertView *alertView = [[CustomIOS7AlertView alloc] initWithParentView:self.view]; alertView.tag = 1; [alertView setDelegate:self]; [alertView show]; }
Detecting that exactly the alert view above was closed
- (IBAction)customIOS7dialogButtonTouchUpInside:(id)sender { NSLog(@"Button at position %d is clicked.", [sender tag]); NSLog(@"Alert View Tag: %d", [[[sender superview] superview] tag]); }
Hey, thanks a lot. The next update matches the standard UIAlertView delegate (which has a better solution for this).
If I have a lot of alert views, I tag them to identify properly in controller delegate method. We need to create more comfortable way to do it (pass a tag in the delegate method, put some methods so users can tag buttons, etc?)
Here is how I do it now
Creating alert view(s)
Detecting that exactly the alert view above was closed