Questions tagged [uitextfielddelegate]

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class.

The methods declared by the UITextFieldDelegate protocol allow the adopting delegate to respond to messages from the UITextField class. On UITextFieldDelegate, you can find the following methods:

Managing Editing

– textFieldShouldBeginEditing:

– textFieldDidBeginEditing:

– textFieldShouldEndEditing:

– textFieldDidEndEditing:

Editing the Text Field’s Text

– textField:shouldChangeCharactersInRange:replacementString:

– textFieldShouldClear:

– textFieldShouldReturn:

574 questions
2
votes
1 answer

iOS UITextField won't become first responder after view reload

When my view (view A) loads, a UITextField becomes the first responder. I can then push a new view controller (view B), but when I pop that view controller back to view A, the UITextfield doesn't become the first responder anymore. I have to touch…
2
votes
2 answers

get into a second line in uitextview, UITextView, ios

My view is containing : first name ( UITextField ) last name ( UITextField ) email ( UITextField ) note ( UITextView ) picture is following The codes below is used to handle when you enter a return key -…
2
votes
5 answers

Trying to get index of active cell from textField inside custom cell of UITableView in iOS

I have a UITableView in my application where I have custom UITableViewCell which contains a UITextField. What I would like to do is get the correct index of the row when I select a particular textfield from that row. Unfortunately, I am only able…
syedfa
  • 2,801
  • 1
  • 41
  • 74
2
votes
2 answers

Why do I get an error when I assign a UITextField Delegate to itself?

I am doing the following: self.firstNameTextField.delegate = self.firstNameTextField; My firstNameTextField is a custom text field. I want the custom text field to handle all the delegate events. When I do the above I get the following warning:…
john doe
  • 9,220
  • 23
  • 91
  • 167
2
votes
1 answer

textfieldshouldclear: not invoked by UITextfield

I am trying to invoke -(BOOL) textFieldShouldClear:(UITextField *)textField when UITextField's clear button is tapped. I have already set my delegate and UITextField's other delegate's methods are being called correctly, except this one. Clear…
NightFury
  • 13,436
  • 6
  • 71
  • 120
2
votes
1 answer

How to include return button in UIKeyboardTypeDecimalPad?

I am implemented a UITextField which is supposed to only let user include decimal numbers. I have changed the keyboard type to UIKeyboardTypeDecimalPad but there is no return button on this keyboard layout to get out of the text field. I don't want…
Khawar Ali
  • 3,462
  • 4
  • 27
  • 55
2
votes
1 answer

Keyboard not showing-up for UITextField in UITableViewCell in iOS 6.x

Working on iPhone/iPad application, Problem: Keyboard not showing-up for UITextField in UITableViewCell in iOS 6.x, but same code works fine on iOS 5.x We developed a UIViewController, in which we tableview is created. In this tableview, we have…
Rohit
  • 6,941
  • 17
  • 58
  • 102
2
votes
1 answer

UITextField: textFieldShouldBeginEditing fires, but keyboard does not show

I have a text field that is apparently successfully calling delegate methods as the following method fires when I tap on the test field, but no keyboard shows. - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { NSLog(@"should begin…
OWolf
  • 5,012
  • 15
  • 58
  • 93
2
votes
3 answers

Accessing textField embedded in cell

I have created a table which dynamically creates cells which are customized to contain a textField. When I run the program, I am able to enter text into the textFields. However, I am not able to collect the text entered into them before quitting the…
Rutvij Kotecha
  • 935
  • 2
  • 10
  • 21
2
votes
3 answers

How To Update a UILabel as text is being typed in a UITextField

This is my first post to StackOverflow and I am also new to Xcode and Objective-C. I have read about delegates and I have also experimented with other peoples code. However, I wanted to see if I could create something myself that uses delegates…
2
votes
3 answers

iPhone Simulator crash (with EXC_BAD_ACCESS) when UITextField delegator is called

So I've got some textfield laid up in my controller.. The Controller extends UITextFieldDelegate so it handlers textFieldDidBeginEditing for those textfields, and all that works fine! Then I tried to added a new textfield from a new class called…
netdigger
  • 3,659
  • 3
  • 26
  • 49
1
vote
4 answers

UITextField - can not input text. Keyboard does not responds

I have UIViewController with UITextField in it. #import @interface TextMemoViewController : UIViewController @property (unsafe_unretained, nonatomic) IBOutlet UITextField *textMemo; @end In implementation…
boder
  • 47
  • 1
  • 4
1
vote
2 answers

Moving the focus of a textfield to another based on conditions

I have 10 textfields, each of which could hold at most one character. When I enter a character in the first textfield, the focus should automatically move to the next textfield and so on. That is, as soon as the first character is entered in a…
Xavi Valero
  • 2,047
  • 7
  • 42
  • 80
1
vote
1 answer

UITextField doesn't seem to be calling textFieldShouldBeginEditing

I am trying to disable UITextField from opening the keyboard but I am having trouble .h #import @interface XXViewController : UIViewController { IBOutlet UITextField* someTextField; } @property (nonatomic,…
1
vote
2 answers

UITextFieldDelegate SecondView

I'm using iOS 5 and trying to use TextField with UITextFieldDelegate, it's worked exactly like I want (but JUST in the first View). I don't understand, why it's not working in the next view. For simple example, I created new project…
NitNot
  • 31
  • 4