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
5 answers

How to dismiss keyboard with multiple UITextField

I'm a noob here and in iOS world. I am having trouble dismiss keyboard on a specific case in my very simple todo list iOS app. I'd like the keyboard to get dismiss when user taps anywhere outside the current text field or the keyboard itself. So…
wotzup
  • 33
  • 1
  • 4
3
votes
2 answers

MLPAutoCompleteTextField suggestion table interaction issue

Currently I'm using this third-party library in my project https://github.com/EddyBorja/MLPAutoCompleteTextField. This library is used to show the suggestion list based on user input. I did setup the text field like this self.searchTextField =…
Merkurial
  • 242
  • 3
  • 17
3
votes
2 answers

Updating constraints in textFieldDidBeginEditing method causes text to bounce

I have a UIView which contains another UIView object called contentView. Inside contentView, I have several UITextField objects. So that the current editing UITextField is always visible and not being hidden by the keyboard, I am altering the…
Ben Williams
  • 4,695
  • 9
  • 47
  • 72
3
votes
1 answer

How to highlight text automatically inside an UIAlertView text field

I have an UIAlertView with a textfield that shows a default value and two buttons, one to cancel and the other one to confirm. What I am trying to do is that when the alert view is popped up the default value is highlighted so the user can overwrite…
jigzat
  • 3,498
  • 1
  • 21
  • 23
3
votes
0 answers

Crash when focus on UITextField

I have a UITextField which inside a UITableCell in a xib file TableView dequeue the cell, try editing the text fieldon iOS 7, it work fine. When I tested the app in iOS 8, it crash the app and throw the exception below when touching (focus) on the…
user4603808
3
votes
1 answer

When viewDidLoad set textField editable / enable keyboard

I have an app with a UITextField. When the containing view appears, I want a keyboard to slide up and begin editing this text field. Not sure how I would go about doing this? I've tried: func viewDidLoad { textField.editing ==…
YichenBman
  • 5,011
  • 8
  • 46
  • 65
3
votes
1 answer

UITextField input mask?

http://sublime.nyasha.me/admin/form_masks.html I use this technique to achieve nice results with html/css/java etc, but how does one achieve this in objective-c? I've read so far about number formatting, but how can I literally have it so when the…
user2415313
  • 101
  • 1
  • 10
3
votes
2 answers

Swift: UITextField is hidden by Keyboard

I have two UItextFields on my ViewController. The first one is in the top half of the ViewController but the second one is towards the bottom. I have managed to get the keyboard to hide on return however, When I click into the second (lower down)…
DannieCoderBoi
  • 728
  • 2
  • 12
  • 31
3
votes
1 answer

Create text field with keyboard in Xcode

Is there any way to make a text field with keyboard (such as Twitter or Whatsapp)? I tried to find some help from Google but I could not. Can anyone help me with this issue or at least to direct me where I can find some info?
Ahmed.S.Alkaabi
  • 243
  • 2
  • 10
3
votes
1 answer

UIBarButtomItem tintColor not working if i change the appearance of UITextField

I have a instance of UIBarButtonItem. I want to change the tintColor of the UIBarButtonItem to orangeColor. And I also change the appearance of UITextField to orangeColor in the Appdelegate. // some view controller UIBarButtonItem *barButtonItem =…
thuai
  • 31
  • 4
3
votes
1 answer

UITextField rightView moving outside of UITextFiled

I'm trying to use the rightView property of the UITextField class to provide a suffix to a text field. It all seems to work correctly, until I stop editing the text field, at which point the label is moved outside of the UITextField. The code used…
Joseph Duffy
  • 4,566
  • 9
  • 38
  • 68
3
votes
1 answer

iPad: Event handler for "Next"/"Enter" key?

How do you catch the "Enter" key event on a UITextFIeld on the iPad?
MikeN
  • 45,039
  • 49
  • 151
  • 227
3
votes
2 answers

UITextField - Limit text lenght not by character count

is there a way to limit a textfield but not by character count? I would like to stop the ability to type when the end of the field is reached. But as different characters have different dimensions stopping at a certain count ist not really a…
greg
  • 33
  • 4
3
votes
1 answer

Check if if a text field from a collection of UITextFields is empty

I currently have a collection of UITextFields wired from IB to my Swift code. The user has option to tap a button to proceed to the next view, but my app requires all fields to be filled. Below is my method that checks if a text field is empty: func…
Satre
  • 1,724
  • 2
  • 18
  • 22
3
votes
2 answers

How can I change iOS keyboard background to darker color i.e. to black?

I will have an App in App Store called Notes at Night and I want to use a more dark keyboard in background. How can I set it?
János
  • 32,867
  • 38
  • 193
  • 353