ALERT VIEW BUTTON INDEX DELEGATE METHOD NOT CALLED

zack mathews

Total Post:23

Points:161
Posted by  zack mathews
 518  View(s)
Ratings:
Rate this:

Am new to AlertViews with actions. Have set mine up as in the examples I found here including setting the delegate method in my .h, but when I debug find that it is not reaching my clickedButtonAtIndex method.

What gets wrong in my code, please help me.

  1. Tarun Kumar

    Post:214

    Points:1642
    Re: Alert View button index delegate method not called

    I think your problem will be in the alert view delegate, set your delegate to self.
    Like this:

    UIAlertView *alertObj = [[UIAlertView alloc]

    initWithTitle : @"Write your title here"
                                   message : @"Write your message here"
                                  delegate : self // set self here
                         cancelButtonTitle : @"Cancel Button Clicked"
                         otherButtonTitles : nil];

      Modified On Dec-07-2015 11:20:56 PM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!