Questions tagged [uitextfield]

A UITextField object is a control that displays editable text and sends an action message to a target object when the user presses the return button. You typically use this class to gather small amounts of text from the user and perform some immediate action, such as a search operation, based on that text.

A UITextField object is a control that displays editable text and sends an action message to a target object when the user presses the return button. You typically use this class to gather small amounts of text from the user and perform some immediate action, such as a search operation, based on that text.

In addition to its basic text-editing behavior, the UITextField class supports the use of overlay views to display additional information (and provide additional command targets) inside the text field boundaries. You can use custom overlay views to display features such as a bookmarks button or search icon. The UITextField class also provides a built-in button for clearing the current text. A text field object supports the use of a delegate object to handle editing-related notifications.

Resources:

8508 questions
3
votes
1 answer

how do I create or assign a delegate?

How do I make a delegate? I have a class called CustomSign. The class has a view associated with it. The view has 2 elements. A textfield and a uilabel. I want to copy the textfields data to the uilabel when you click the done button. Here's my code…
Cocoa Dev
  • 9,361
  • 31
  • 109
  • 177
3
votes
2 answers

Can't Call resignFirstResponder from textFieldDidBeginEditing ? (iPhone)

[myTextField becomeFirstResponder]; [myTextField resignFirstResonder]; When I do this -(BOOL)textFieldShouldReturn:(UITextField *)textField , it works. But when I use the same code inside -(void)textFieldDidBeginEditing:(UITextField *)textField ,…
Chris
  • 5,485
  • 15
  • 68
  • 130
3
votes
2 answers

How to call a method when the Done Button in the KeyBoard is Clicked?

I want to call a method when the done button is clicked in the UITextField KeyBoard? Please Help me...
Pradeep Reddy Kypa
  • 3,992
  • 7
  • 57
  • 75
3
votes
3 answers

UITextField - Keyboard not hiding when app comes from background

In my iOS app, I've UITextfield at the bottom of the view. So, when user starts entering text, I'm sliding the view up so that users can see what they are typing. While entering text, view moves upwards, then press home button and the app goes to…
Satyam
  • 15,493
  • 31
  • 131
  • 244
3
votes
0 answers

iOS 8 switching applications causes keyboard to dismiss, pointInside to behave differently

Very strange iOS 8 bug. My iOS app has some UIViewControllers with UITextfields When in edit mode, they needed extra help dismissing the keyboard when tapping outside I fixed this in iOS 7 by adding something like this in each VC -…
roro
  • 265
  • 3
  • 11
3
votes
4 answers

shouldChangeCharactersInRange returning old results iOS

I am new to iOS. I have a viewcontroller for registration, it contains three UITextfields for Email,password, Confirm password and a UIButton. I have some validations, On success of those validation I have to enable signup button. I have implemented…
Muhammad Burhan
  • 145
  • 1
  • 2
  • 11
3
votes
0 answers

UITextField custom drawing when editing

I am trying to build a textfield with a custom prefix (think of the textfield for inputting a phone number and the prefix being the international dialling code). I would like the textfield to behave very much like a normal textfield and the prefix…
quentinadam
  • 3,058
  • 2
  • 27
  • 42
3
votes
0 answers

UITextView becomesFirstResponder animation jitters when UIViewController being pushed

I am working on the latest version of iOS 8 GM. Using a UINavigationController, I'm trying to push a UIViewController containing a simple UITextField and make the keyboard pop in the same animation than the push. On iOS 7, everything worked great,…
Champoul
  • 1,004
  • 7
  • 15
3
votes
0 answers

Enable and Disable Keyboard return key on demand in iOS

I have a UITextField. While user is typing, I am using - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string to validate the string. And if the string is valid I want to enable…
learner
  • 11,490
  • 26
  • 97
  • 169
3
votes
1 answer

International keyboard and UITextField secure option

I have a UITextField in a .xib file with the secure option marked as YES. I have several international keyboards on my device. When the secure option is set to NO, I have no problem using all of the international keyboards on my device, but when it…
Rony Rozen
  • 3,957
  • 4
  • 24
  • 46
3
votes
2 answers

How to pass string from a text field (embedded in a table cell) in 2nd controller back to a label in 1st controller (also embedded in a table cell)?

Edit 1: I think I have figured out the problem, I just haven't been able to solve it. In SecondViewController.m where textFieldShouldReturn is defined, "if ([self.delegate respondsToSelector:@selector(passString:)])" returns false, since NSLog was…
3
votes
1 answer

iPhone: Positioning Multiple UITextFields When Keyboard is Shown and Orientation Changes

I have a view that contains 10 UITextFields created programatically. I want the following behavior: When I click on a particular UITextField, the keyboard should hide all the text fields which are visually below the selected text field. If I have…
user217572
  • 185
  • 1
  • 5
  • 10
3
votes
4 answers

Dismiss Keyboard when editing UItextfield on Swift

i want to make a calculator with two textfield. there are numbers buttons and mathematical operations buttons. but i couldn't dismiss keyboard when clicking textfield. i never want to show keyboard but , want to edit textfield with numbers…
ardacankaya
  • 211
  • 1
  • 4
  • 14
3
votes
3 answers

Crash on textfield become first responder with pickerview

so I've been trying to get this pickerview working but I just can't get it to work. When I run the app it crashes without any stacktrace and shows Thread 1: EXC_BAD_ACCESS on [textField becomeFirstResponder]. The pickerArray is correct, so that's…
user3347446
  • 133
  • 2
  • 9
3
votes
3 answers

Use entered text from view in other view in Swift (Xcode 6)

I am almost completely new to Swift and Xcode so excuse my lack of knowledge in this field. At the moment I have a view controller with a label in it. I want to add a view before that, with a text field in which a user enters a name, the app then…
B_s
  • 3,026
  • 5
  • 32
  • 51