---
title: "Alert View button index delegate method not called"  
description: "Alert View button index delegate method not called"  
author: "zack mathews"  
published: 2015-12-04  
updated: 2015-12-07  
canonical: https://www.mindstick.com/forum/33681/alert-view-button-index-delegate-method-not-called  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Alert View button index delegate method not called

Am new to AlertViews with actions. Have set mine up as in the examples I found here including setting the [delegate](https://www.mindstick.com/articles/777/delegate-and-event-in-c-sharp) [method](https://www.mindstick.com/forum/166/webservice-method) in my .h, but when I [debug](https://www.mindstick.com/forum/156/how-to-debug-application-on-the-server) find that it is not reaching my clickedButtonAtIndex method.

What gets [wrong](https://answers.mindstick.com/qa/48468/who-wrote-the-the-wrong-enemy-america-in-afghanistan-2001-2014-and-when) in my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii), please help me.

## Replies

### Reply by Tarun Kumar

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];
```


---

Original Source: https://www.mindstick.com/forum/33681/alert-view-button-index-delegate-method-not-called

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
