---
title: "Detecting value changed in UITextField"  
description: "Detecting value changed in UITextField"  
author: "Anonymous User"  
published: 2015-10-28  
updated: 2015-10-28  
canonical: https://www.mindstick.com/forum/33540/detecting-value-changed-in-uitextfield  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Detecting value changed in UITextField

I was creating an [iPhone app](https://www.mindstick.com/articles/208914/4life-innovations-is-bracing-up-to-acquire-ios-13-for-iphone-app-development) and having a situation when I need to [detect if](https://www.mindstick.com/forum/12896/how-to-detect-if-device-support-eap-sim) the [text field](https://www.mindstick.com/forum/33753/how-to-get-value-from-text-field-on-button-click-in-ios) value is changed every time. The UITextFieldDelegate [method](https://www.mindstick.com/forum/166/webservice-method) shouldChangeCharactersInRange works but it’s not fully [useful](https://www.mindstick.com/articles/12694/how-dolomite-mineral-is-useful-in-human-life) for me because it returns YES, so the texts of textField are not being available to other methods.

I want something like Java textChanged [event handler](https://www.mindstick.com/forum/1371/c-sharp-dot-net-event-handler-delegate-question), can [anyone help me](https://www.mindstick.com/forum/331/can-anyone-help-me-out-how-to-use-session-concept).

## Replies

### Reply by Tarun Kumar

Yes, your problem is thinkable but I have a solution for your problem. For the text field control add a notificationMethod “*textFieldDidChange*”.\
For example:

```
[textField addTarget:self                  action:@selector(textFieldDidChange:)                  forControlEvents:UIControlEventEditingChanged];
```

Now, the textFieldDidChange: method will be called whenever you will change any value and also it can reload your table view as needed.


---

Original Source: https://www.mindstick.com/forum/33540/detecting-value-changed-in-uitextfield

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
