Skip to main content
The 2024 Developer Survey results are live! See the results

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.

0 votes
0 answers
7 views

How can I set focus to a TextField after the user has made a selection from a List?

I need the user to make entry into a TextField, but only after having made a selection from a List field. Therefore I have the TextField disabled until they chose a List item, and am able to enable it ...
Bartender1382's user avatar
0 votes
0 answers
29 views

If the TextField is in the Toolbar, the keyboard does not disappear when using BackSwipe

I made a custom search, which is in the toolbar, at the .principal position (using iOS 16). func navigationBarWithSearch(searchText: Binding<String>, keyboardAppearanceDelay: Double = 0.0, ...
Simimi_Dot's user avatar
0 votes
0 answers
25 views

Difficulty with UITextField visibility in dark theme when background turns yellow on strong password suggestion

I have a UITextField in my iOS app where the background turns yellow automatically when iOS suggests a strong password. This behavior is handled automatically by iOS. However, in dark theme mode, the ...
sangam pokharel's user avatar
0 votes
1 answer
33 views

UITextField backspace not working correctly for the first placeholder in a 6-digit verification code input in Swift

I am building an iPhone app where users can enter a 6-digit verification code, each digit in a separate UITextField. The UI is created programmatically with UIStackView to arrange the text fields ...
TheGuyWhoCantCode123's user avatar
0 votes
1 answer
40 views

Error when attempting to set a UITextField to first responder

I get this error when calling becomeFirstResponder() on a UITextfield: -[RTIInputSystemClient remoteTextInputSessionWithID:performInputOperation:] perform input operation requires a valid sessionID. ...
April G's user avatar
0 votes
1 answer
43 views

textfield text (one or more than one) regex check Swift UIKit

I created the regex logic, it works correctly, but in addition to one textfield I can have several of them, I created a dictionary and a variable so that it gives me a bool value of true, provided ...
Albert Asadov's user avatar
0 votes
2 answers
89 views

in iOS17 UIKit is there a way to change/affect the border color of an iOS17 UITextField (other than the mangle shown here)?

This is about iOS 17 only. The only way I could hack around and achieve something like this was find the actual, real, border, get its real values sadly just add a fake on top of that layer once ...
Fattie's user avatar
  • 13.9k
0 votes
0 answers
41 views

.telephoneNumber unable to set suggested mobile on UITextfield

.telephoneNumber unable to set suggested mobile number in keyboard to my textfield (run in device only) lazy var mobileTextField : UITextField = { let s = UITextField() s.textColor = ...
DSRawat's user avatar
  • 107
1 vote
1 answer
47 views

How to set isUserInteractionEnabled to false on specific UIViewRepresentable TextField accompanied with regular SwiftUI Text Fields

I have SwiftUI View where are two normal TextFields and one UIViewRepresentable UITextField. I need to turn off possibility of copy/paste/select on UIViewRepresentable while typing values. I'm doing ...
thadae's user avatar
  • 13
1 vote
0 answers
32 views

iOS Keyboard not hiding on another view tap

I have a stack view with UITextField (textView) and UIView (dropdown) in it. Its a backend-driven UI, therefore the views are not initialized on screen load. Rather theyre added after UI request is ...
Russ's user avatar
  • 73
0 votes
0 answers
27 views

Why UITextField with contentType .newPassword loses its keyboard type when unfocused and then focused again?

I have three UITextField views: oldPassword, newPassword, confirmPassword which look like this: Each of them has defined like this: let oldView = UITextField() oldView.textContentType = .password ...
Bartłomiej Semańczyk's user avatar
0 votes
2 answers
63 views

How to create a UITextField with inline validation error?

Im trying to build a custom UITextField that shows a validation error inline below the textfield akin to material design. Im adding a UILabel lazily and constraining to the textfield when i present ...
thesuffering's user avatar
0 votes
1 answer
165 views

How to show one view on another view in SwiftUI

I have created one green coloured view with back button and imageview and two texs and search button. now if i click on searchBtn i need to show one white coloured view with textfield and close button....
Swift's user avatar
  • 1,172
-1 votes
1 answer
49 views

How do ı move UITextFieldDelegate to ViewModel

extension ViewModel: TextFieldDelegate { func textFieldShouldReturn(_ textField: UITextField) -> Bool { search() textField.resignFirstResponder() return true } } ...
HBK's user avatar
  • 5
0 votes
0 answers
12 views

UITextView textContainer.exclusionPaths not working well

I have a UITableViewCell with a UITextView and a button that appears when the tableview and cell are in edit mode (isEditing = true). I set the editing mode with setEditing(, animated: ) in my view ...
jfhamel's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
569