iphone - UIAlertView Click event inside UIAlertView delegate -


I'm new in the iPhone developer,

I would like to introduce a 2 cautious view after another wish when users delete button press, then 1 pm Yes and not p> now, if the user presses Yes , then 2 warnings will come with visual message deleted successfully! I want to call a method when clicking this OK button, with the only OK button included in this warning view.

And if the user does not press no then nothing should be canceled and should be rejected.

Here's a piece of my code,

  - (minus) DeletebtnCliked: (id) This {UIAlertView * alertView = [[UIAlertView alloc] initWithTitle: @ "Do you Really want to delete "Message: Zero Rep: Automatically cancel tooltitle: zero other buttons: @" yes ", @" no ", zero]; [Show warning view]; [Release Release]; } - (void) alertView: (UIAlertView *) alertView clickedButtonAtIndex: (NSInteger) buttonIndex {if (buttonIndex == 0) {UIAlertView * alertew = [[UIAlertView alloc] initWithTitle: @ "was successfully deleted!" Message: Zero Rep: Auto Cancel Button: @ "OK" Other Button Titles: Zero]; [Alert show]; [Warning issued]; If (button indand == 0) {[self methandol]; }} And if (Button Indent == 1) {[Warning view was dismissed as since Bitwin: 1 Animated: TRUE]; }}   

After writing this code I am inside the eternal loop.

Any help would be appreciated.

  alert View.tag = 1; Alertew.tag = 2; - (void) alertView: (UIAlertView *) alertView clickedButtonAtIndex: (NSInteger) buttonIndex {if (alertView.tag == 2) {// do something} else {// something} What}    

Comments