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

Color attribute persisting with NSAttributedString in UITextField

I have an issue with a NSAttributedString in a UITextField, So what I want is that the usernames in the the textfield are in color blue. This code is working for this purpose but the problem is, when user hit back in the textfield until a username,…
Seylar
  • 151
  • 1
  • 1
  • 5
3
votes
2 answers

Is there any universal solution for scrolling both UITextView and UITextField above the keyboard on screen

How to scroll UITextField, UITextview in UITableView or in UIViewController when keyboard appears on the screen.
Arun
  • 85
  • 1
  • 1
  • 8
3
votes
1 answer

iphone uitextfield - empties on focus (simple right?)

I have a simple question, I have a UITextField (made from IB), and I would like it not to empty (become "") on click, when it gets focus. I cant find the setting, what/where is it?
oberbaum
  • 2,451
  • 7
  • 36
  • 52
3
votes
2 answers

Adding inner shadow on uitextfield and uitextview

I am trying to add inner shadow on few UITextField and UITextView. I have set cornerRadius property for these controls to 1.0. and I am using the code which is mentioned below to create the inner shadow. But problem is that the shadow appears with…
3
votes
1 answer

Move text in UITextField with animation

I need to move text in UITextField (from right to left, and then back) with animation like in Safari App in iOS 7 (see the screenshots below). Is there any way to do it? I know that I can set textAlignment, but it won't be animated. Maybe I should…
Maxim Irbe
  • 203
  • 4
  • 7
3
votes
1 answer

Label inside UITextField

In my application, i'm trying to create UITextFields that looks like this: | Name: John Doe | | Email: asdf@gmail.com | | Number: (123)456-7890 | Name is a left view label that will never be editable, there is a small constant…
Josue Espinosa
  • 5,009
  • 16
  • 47
  • 81
3
votes
1 answer

Accepting autocorrect in UITextField produces a small blink

I have an issue with a UITextField and the docs haven't turned up much. The issue: When using autocorrect in my UITextField, if the user uses the suggestion, my UITextField blinks, or more accurately a small white box briefly appears. Below is an…
Jason Renaldo
  • 2,802
  • 3
  • 37
  • 48
3
votes
0 answers

Typing in one UITextField results in not being able to type in any other UITextField with a UIViewController, UIScrollView and AutoLayouts

I have a simple application with a view controller consisting off 3 UITextFields, a DatePicker and a Segment Control. I have spent a ton of time getting my ViewController scrollable with AutoLayout and a UIScrollView (entirely in Storyboard). The…
amitsbajaj
  • 1,304
  • 1
  • 24
  • 59
3
votes
1 answer

UITextfield's text doesn't move to left after it's filled - as I keep typing

I've used UITextfield inside Tableview's cell using the following code: - (UITextField *)textFieldWithDefaultsForCell:(int)cellIdentifier { UITextField *textField = [[[UITextField alloc] initWithFrame:CGRectMake(180, 12, 135, 20)]…
farhad rubel
  • 2,334
  • 2
  • 22
  • 29
3
votes
1 answer

shouldChangeCharactersInRange call twice

Sometimes, shouldChangeCharactersInRange is called twice when I hit only one character. As an exemple, i enter 'avion par c', the procedure is called and add me a second 'c' result is 'avion par cc' - How can I avoid that ? This happened only since…
3
votes
2 answers

How to change date format from mm/dd/yyyy to yyyy/mm/dd in iphone?

I am fresher to ios. I want to change the textField entered date(mm/dd/yyyy) format to (yyyy/mm/dd) and store the resulted date in a string. Would you please help me in this problem. For example if i will enter date in textField like…
3
votes
2 answers

ios7 textfield shouldchangecharactersinrange is not called when a word is selected from autocorrection bar

UITextField shouldChangeCharactersInRange delegate method is not called when a word is selected from autocorrection bar with simplified Chinese keyboard. When I type 'ni hao', this delegate method gets called for each character, but when I selected…
bricky
  • 33
  • 4
3
votes
3 answers

iPhone - UITextView should look like a UITextField

I need a textfield so an user could write several lines. Unfortunately a UITextField does not provide several lines, so I think I have to use an UITextView. But the design of both are not the same. Is it possible to design the UITextView like the…
Tim
  • 13,228
  • 36
  • 108
  • 159
3
votes
3 answers

How do I change the UITextField so it looks like the Search Text Field?

I would like to change the standard iPhone UITextField so that it looks exactly like the search text field within the UISearchBar. You can see an example of this for the SMS text entry field within the iPhone Messages application. I do not believe…
Luke
  • 6,195
  • 11
  • 57
  • 85
3
votes
1 answer

Why is cursor not at top of UITextField?

I have an iPad app (XCode5, ARC, Storyboards, iOS 7). This is the problem (placeholder and cursor in middle of UITextField): This is the code that creates it: - (IBAction)bSendFeedback:(UIButton *)sender { // make the popover UIViewController*…
SpokaneDude
  • 4,856
  • 13
  • 64
  • 120