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.
uitextfield
8,522
questions
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 ...
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, ...
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 ...
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 ...
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. ...
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 ...
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 ...
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 = ...
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 ...
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 ...
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
...
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 ...
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....
-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
}
}
...
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 ...