Questions tagged uitextfield

Explore the latest questions and answers asked by our top developers.

How can I achieve this functionality to enter DOB in UITextField

I used a variable to store the text being entered and modifying it by appending the remaining suffix of "mm/dd/yyyy". I am getting the functionality, but if I try to update the cursor to the right position, its creating a problem. I used the textfield.selectedTextRange to move the cursor from EOF to position I need. […]

By Lax
Published
Categorised as ios, swift, uitextfield Tagged , ,

Fix warning: Failed to set (lineColor) user defined inspected property on (Project.UnderlinedTextField)

I keep getting this warning: 2020-08-22 17:33:31.484454-0500 bob-app-ios[95799:7064579] Failed to set (lineColor) user defined inspected property on (projectName.UnderlinedTextField): [<projectName.UnderlinedTextField 0x7fbca5084e00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key lineColor. When running my project in a simulator, this is my UnderlinedTextField class: import UIKit class UnderlinedTextField: UITextField { var isWriting = false let […]

By Frakcool
Published
Categorised as ios, swift, uistoryboard, uitextfield

iOS detect keyboard layout (e.g. QWERTY, AZERTY)

I am building a custom suggestion/autocorrection feature in an iOS app. It must detect accidental adjacent keypresses and compare this to a known word list to suggest the word it thinks the user intended to type. For example, if the custom word list contains cat, dog, monkey, and the user types cst, the app can […]

By Wheelie
Published
Categorised as autosuggest, internationalization, ios, keyboard, uitextfield

Change prompt color for UITextField on mac catalyst

How can I programmatically change the color of the prompt on mac catalyst for an UITextField? The prompt exist but with the same color as UITextField. The prompt is showing the right color on iOS. I unsuccessfully tried .tintColor Code + iOS and Mac Catalyst result Source: Ios

By Christophe Vichery
Published
Categorised as ios, maccatalyst, uitextfield

Custom TextField does not comply to constraints

I’ve been having this issue with HoshiTextField for quite some time now, I also opened an issue on git but didn’t get an answer… This is how it should look like and how it looks like if the user is selecting the textField: The problem occurs when setting the textField to becomeFirstResponder inside viewDidLoad or […]

By Chris
Published
Categorised as constraints, ios, swift, uitextfield

How to move imageview using uipangesture when constraints are already applied to textfield

My swift code below applies 2 contraints to allow a textfield (enterText) to enter text and reamin in the same position it was moved too. I want to be able to move around the imageview pic around using uipangesture. However I can not do that because of the 2 constraints already applied to pic. So […]

Entering text into textfield causing uipangesture object to move back to its orginal position

My swift code below has a image view connected to a pangesture. When something is entered into a textfield when after the image view is moved. The image view reverts back to its original position.The gif represents that what is going on. I just don’t want the effect of the pangesutre to be nullified after […]

Copy/past UIMenuItem not showing in all my application

I have a problem that occurs in all my application (minimum target iOS13): there’s no UIMenuController displayed, nor in UISearchBar nor in UITextFieald. I tried to subclass a UITextField and override canPerformAction, the func is triggered, i return true but nothing happen.. can anyone help, thanks. Source: Ios

By Red Mak
Published
Categorised as ios, uimenucontroller, uisearchbar, uitextfield, xcode

Copy/paste UIMenuItem not showing in all my application

I have a problem that occurs in all my application (minimum target iOS13): there’s no UIMenuController displayed, neither in UISearchBar nor in UITextFieald. I tried to subclass a UITextField and override canPerformAction, the func is triggered, i return true but nothing happen.. can anyone help, thanks. Source: Ios

By Red Mak
Published
Categorised as ios, uimenucontroller, uisearchbar, uitextfield, xcode

Add UITextField to title view of navigation item

How do you add a text field to the title view of a navigation item and have it sized correctly? It works fine if I do this with a search bar like this but I don’t know how to get a text field to size itself in the same way as a search bar. myViewController.navigationItem.titleView […]

By Berry Blue
Published
Categorised as ios, ios7, objective-c, uitextfield

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq