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:

8328 questions
2
votes
2 answers

Custom UITextField

I know that it has been asked before but I hadn't seen any answers that I could use. So I am sorry for asking a repeat Q but it is kind of important. So is there any way to change the background color of a rounded UITextField. I have RGB values that…
Jackelope11
  • 1,181
  • 4
  • 15
  • 31
2
votes
1 answer

Why is setDelegate not working for UITextFieldDelegate, but working via Interface Builder

I have the following code below, and I can't figure out why the textFieldShouldReturn method is not being called. When I use IB to create the connection to the delegate, it works, but when done programmatically, the log statement is not being…
Praveen R.
  • 231
  • 3
  • 15
2
votes
2 answers

how to convert UITextfield into hex value

I am wanting to xor (^) two values and pass the result to an integer. Both values are being passed in from UITextFields, the first like so ... NSString *recieveCode = myCode.text; int tempCode = [recieveCode intValue]; however the second value…
C.Johns
  • 10,107
  • 18
  • 99
  • 155
2
votes
1 answer

Send emptyText to Service SwiftUI

I want to send empty text inside the searchText to AuthorService() if button value .isCancel is true. So that my author search result will be cleaned. import SwiftUI import Combine struct AuthorSearchBar: View { @StateObject var service =…
Mert Köksal
  • 359
  • 1
  • 9
2
votes
6 answers

iPhone: How to make a UITextField, UITextView uneditable when switching views

I have two views - one a table view and other a detail view in my iphone app. When a row in table is selected, the detail view is displayed. I am using the nib for detail view for editing a record, adding a new record as well as displaying a…
vikmalhotra
  • 9,561
  • 19
  • 89
  • 136
2
votes
1 answer

UITextField SecureTextEntry field changes the keypad from numberpad to generic keypad

I have a textField created in IB. I have set the keypad type to Numeric Pad in IB. When i make secureTextEntry = YES in -(void)textFieldDidBeginEditing:(UITextField *)textField method , my keypad changes from numberpad to generic keypad. I even…
user946414
  • 135
  • 1
  • 2
  • 8
2
votes
1 answer

SwiftUI SecureField: How to achieve the same character obscuring behaviour as in UIKit?

My problem is SecureField in SwiftUI doesn’t display characters input by the user for any time at all, it just directly shows the '•' symbol for each character as it's typed - whereas in UIKit, UITextField (with isSecureTextEntry = true) shows the…
Mete
  • 4,855
  • 4
  • 26
  • 34
2
votes
1 answer

UIkeyboard popup with uitextfield on top (pic included)

I am trying to achieve this type of effect where a barbutton is pressed and uikeyboard pops up and right above it brings a uitextfield with it. Please see image attached. Can someone point me to the right about how I can do this? Thanks.
user635064
  • 6,059
  • 12
  • 52
  • 98
2
votes
4 answers

How can I allow backspace in a UITextField?

In my project, I have to limit the length of a UITextField to 6 characters. This is working absolutely fine. Once I end editing and start editing again and I click backspace my application crashes. Here is the code: - (BOOL)textField:(UITextField…
Baby Groot
  • 4,609
  • 39
  • 50
  • 67
2
votes
1 answer

resignFirstResponder and proofreader/PRDBinit 16 byte leak?

We're having a minor issue dealing with the pesky iPhone keyboard. We have tried - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { [oneTextField resignFirstResponder]; // 100% leak for 16 bytes // some more…
Jens Bergvall
  • 1,597
  • 1
  • 22
  • 51
2
votes
5 answers

Keyboard hides UITextField. How to solve this?

I have a textField which is at bottom of the screen. When I begin editing, the keyboard appears and hides the textField. Can anyone suggest how to solve this?
Aadil
  • 714
  • 2
  • 12
  • 30
2
votes
3 answers

A UITextField in a UITableViewCell

I've been trying to do this for a good few days now but to no avail. I've kind of got myself into a muddle too. Now I'm really confused how I should approach this. Where to start in a new .h and .m file. :/ My goal is to put a UITextField in a few…
K.Honda
  • 3,068
  • 5
  • 24
  • 36
2
votes
1 answer

Possible to hide predictive text bar on UITextField with keyboardType emailAddress on iOS 14?

I have a UITextField for users to enter their email address. I want to have keyboardType set to UIKeyboardTypeEmailAddress so they have the @ and . keys quickly available, but I don't want the keyboard to show the autocomplete bar above it with…
Wernzy
  • 910
  • 7
  • 19
2
votes
4 answers

How can I get rid of "ghost" text that appears in UITextField after clearing the field programmatically?

I have a strange problem with a UITextField - I am setting the value of it to @"" (or anything else still causes it) and then shrinking the field with to zero. Next time I unshrink it, it displays the same value it had before I shrunk it, regardless…
Alex Gosselin
  • 2,932
  • 19
  • 37
2
votes
1 answer

iOS UITextField formatted for time

I have a UITextField which I created programmatically. This text field is used to input a time. The placeholder text is "00:00:00.000". When the text field is tapped, a number pad will appear. Ideally, I want the gray place holder text to remain as…
Evan Johnson
  • 1,444
  • 1
  • 14
  • 30
1 2 3
99
100