mohammadalijf / underlinetextfield Goto Github PK
View Code? Open in Web Editor NEWSimple UITextfield Subclass with state
License: MIT License
Simple UITextfield Subclass with state
License: MIT License
i want to create underlinetextfields programatically for that what properties do i need to set on textfield object ? i have created a following textbox for sample which looks fine but when i start typing the placeholder goes up and the space between placeholder and text is very less.
let firstNameTextField : UnderLineTextField = {
let textField = UnderLineTextField()
textField.placeholder = "First Name"
textField.translatesAutoresizingMaskIntoConstraints = false
```
textField.activeLineColor = UIColor.blue
textField.activeLineWidth = 2
textField.inactiveLineColor = .lightGray
textField.inactiveLineWidth = 1
textField.errorLineWidth = 1
textField.warningLineWidth = 1
textField.font = UIFont.systemFont(ofSize: 14)
return textField
}()`
what else i need to set ?
Hi Mohammad Ali,
Thank you for this wonderful library. We are using it extensively in our code and would an update in the repository for these specifics: Xcode 10, Swift 4.2, iOS 12. We are ever so grateful to you for this kickass library 👍
Best,
Mohsin
It would be great, if you'll add possibility to changing placeholder fonts
hello @mohammadalijf how do i set a icon at left of underline textfield. it will make textfield look nice.
Hi, thanks for this project.
I tried to set LeftView like normal as we do for UITextField
textField.leftView = imageView
but it interfered with place holder and text.!
is there any solution?
I have a few of these placed inside of a UIStackView and the spacing between elements is pretty huge. It'd be nice if there was a way to customize this. The size of each textField appears to be about 90pts, and only half of that is used when the placeholder moves up.
How we can create a Text View ?
Hi Mohammadalijf,
I need to give some padding from the leading for placeholder label, but cannot see any method to achieve the same. can you please provide some code which give padding for the placeholder label in both the cases (while in UP position and in default position).
Thanks,
Tarun
i have a form for user profile where user can submit profile info to server. when user click on submit button , i want to check validation of text fields which is working fine when user edit textfield.
how i can achieve validation error for all the UnderlineTextField on submit button like you are doing after text edit event.
it will be very helpful if you can help.
Thank you.
hello @mohammadalijf this project has been very helpful for me to underline textfields and managing validations thank you for such creative work.
i want to know is there any way to underline a UITextView control like we are doing with UITextFields if there is way please let me know it will be helpful.
Hi Mohammad,
I am happily using your UnderLineTextField, it is really great an useful!
Just wanted to check, if it would be possible to also support the swift package manager?
Kind regards
Dorian
I'm setting certain field contents with code.
Is there functionality to trigger the field validation programatically, so I can have it show a warning or error?
Is there a possibility to have a multiline error message under text field?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.