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

UITextField rightViewMode not working correctly

I need to make a custom clear button on a UITextField, so I am using the rightView. Code is below: UIImage *clearImage = [[UIImage imageNamed:@"search-clear.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(0.0,0.0, 0.0, 0.0)]; UIImageView…
JeffN
  • 1,575
  • 15
  • 26
3
votes
3 answers

resignFirstResponder when tapping UITableView?

I have a UITableView with two custom cells and each of them has a subview with a UITextField inside it. I have tried adding a UIButton on top of the UITableView and have it resignFirstResponder but that just means you won't be able to tap anywhere…
runmad
  • 14,846
  • 9
  • 99
  • 140
3
votes
0 answers

UITextField crashing app on resume

I have a UITextField that I am presenting inside a modal dialog. Upon touching the UITextField, the ABPeoplePicker (contact selector) is presented (also modally). If I then dismiss the ABPeoplePicker AND the originally presented modal dialog THEN…
moliveira
  • 798
  • 8
  • 17
3
votes
2 answers

UITextField's Clear Button set to 'Never Appears' but still shows when adding text

I need to never display the clear button on a specific text field. in IB I've set the clear button as 'Never Appears'. However, once the user inputs even 1 character into the text field, the clear button shows up. These text fields are pretty…
JMD
  • 1,540
  • 2
  • 24
  • 56
3
votes
2 answers

UITextField controlling close button and Keyboard Return key

This might be a simple question to someone. How do I control the return key for the keyboard. I have one setup like this: usernameField.returnKeyType = UIReturnKeyNext; The other like this: passwordField.returnKeyType = UIReturnKeyDone; I would…
StuartM
  • 6,743
  • 18
  • 84
  • 160
3
votes
3 answers

How Can I orderly arrange items in Referencing Outlet Collection automatically?

I have Referencing Outlet Collection of UITextfields arranged in Xib as one below another. When I print Referencing Outlet Collection I found that its orderless. I need to automatically arrange text fields, ie text fileld comes 1st in UI should…
Harikrishnan
  • 9,688
  • 11
  • 84
  • 127
3
votes
1 answer

UITextField - Prevent user from typing non-standard characters (like Emoticons)

My app creates and stores EKEvents into the standard Calendar database, however, I've found that if I use an emoticon as the "notes" for an event, it causes a crash when trying to read the event out of the Calendar. I don't want or need the use of…
jhilgert00
  • 5,479
  • 2
  • 38
  • 54
3
votes
3 answers

Cursor appears before customized UITextField background image

I have a background image of size 360X44 which I am trying to put as the background of my UITextFields however it is showing an unexpected behaviour. The cursor is getting appeared before the image starts but the texts getting written on the write…
Saty
  • 2,563
  • 3
  • 37
  • 88
3
votes
4 answers

Add a UIButton to UIDatePicker

I have a UITextField that I set the inputView to a UIDatePicker so that when the UITextField is pressed, instead of a keyboard, a UIDatePicker pops up. I would like to also add a toolbar with a 'Next' button on it so that the user could easily jump…
user717452
  • 33
  • 14
  • 73
  • 149
3
votes
4 answers

Check if textfield text is almost equal to string

I have a UITextField called textfield. And I have this code to check if the text in the textfield is equal to "exampletext" if ([textfield.text isEqualToString:@"exampletext"]) { NSLog(@"Correct"); } else { NSLog(@"Wrong"); } But I also…
Peter
  • 1,848
  • 4
  • 26
  • 44
3
votes
3 answers

How to hide the keyboard while using TableView in Iphone?

In my application I have textfield and while inserting any values in it it is displaying according values to the tableview as the no. of rows. I want that when I scroll on the Tableview with having so many filled rows ,the keyboard must be hidden at…
Developer
  • 1,009
  • 8
  • 25
  • 56
3
votes
1 answer

UITextField cursor size reducing

I have a UITextField in my project, with an external custom font for the input text (TradeGothic - Bold). The problem is that after setting the font programmatically, the size of the blinking cursor present in the textfield somehow reduces! I have…
Dhruv Goel
  • 2,715
  • 1
  • 17
  • 17
3
votes
3 answers

How to show keyboard upper side of UItextfield when we enter text, in iphone?

I have a UITextfield in which I am entering value. I don't want to scroll myself or adjust keyboard myself , I want Keyboard automatically adjust itself when I enter text in UITextfield and always show below the textfield. Any hints from experts…
Areeba Khan
  • 264
  • 1
  • 2
  • 9
3
votes
1 answer

How To Provide Search-As-You-Type Filtering With UICollectionView?

I have a UICollectionView added to a ViewController. The UICollectionView displays a grid of items with peoples names on each cell. I would like to add search as you type functionality that will filter the UICollectionView as the user types in…
motionpotion
  • 2,656
  • 6
  • 42
  • 60
3
votes
2 answers

resignFirstResponder crashes while using UITextField in custom UlTableViewCell

I am getting an intermittent crash on my application. Crash log makes me think that there seems to be some issue the way UITextField's resignFirstResponser is being called. I am using UITextField and UITextFieldDelegate protocol methods in my custom…
Vik Singh
  • 1,563
  • 2
  • 19
  • 36