alberdev / animatedfield Goto Github PK
View Code? Open in Web Editor NEWAnimated UITextField with check & filter for default types (email, url, password, price, date...) for iOS written in Swift 5
License: MIT License
Animated UITextField with check & filter for default types (email, url, password, price, date...) for iOS written in Swift 5
License: MIT License
Error : Cannot find protocol declaration for 'AnimatedFieldDelegate'; did you mean 'UITextFieldDelegate'?
How i can change the text cases from validationError?
I was able to fix it by changing AnimatedField+TextFieldDelegate.switch, line 39:
let typingExpression = "(type.typingExpression)+"
The regex expression appears to be limited to only a single character, so multiple character replacement strings fail the regex check.
hi, how can we get the actual Date returned after a user taps on "DONE" after they select a date ? which callback holds that value ?
Is there a delegate method for textFieldDidChange
, which is called whenever the text field in the AnimatedField changes? The documentation mentions func animatedField(_ animatedField: AnimatedField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool?
which seems to work very similarly, but I was curious if there is a separate didChange method.
func textFieldDidChange(textField: UITextField) {
//your code
}
I am trying to set a font for an alert label but it is showing me the error that it is not available. I have checked in the demo, that animatedField has alertFont but in my project, I am not able to find alertFont in animatedField file. Kindly help asap.
Giving this error on email textfield.
How can i check if a field contains valid data?
I have a continue button that should only be enabled if all fields are valid, how to check that?
I tried to move it on XIB, aded layouts, bout its doesn't work, alter still in the same position
I want to open the keyboard right after viewdidappear. on a normal uitextfield i would call .becomeFirstResponder() and thats it. how to do it here?
-> I am trying to fetch text value of the field but when its empty .text is returning placeholder value. How can I solve this ?
I want to decrease the space between two labels of text in the text field ? how can i do ?
Is there a specific reason for the caret "^" character being blocked from entry?
Hey, great product! I'm trying to use the multiline type, and I'm having trouble getting it to work inside a scrollView. When I add it as a subview, the AnimatedField view no longer responds to touch events. Do you know what the problem may be? What's the correct way of doing this?
Problem 1: Setting text property makes the title to not appear even when titleAlwaysVisible
is set to true
Problem 2: Setting placeholder attribute of .multiline
puts the placeholder as text instead of a placeholder, making the user having to delete the characters
I'm using your example but just creating fields with code.
how to change or support inputView
I have set titlealwaysvisible property to true and given title color to yellow. When I am selecting a text field and deselect it, it becomes grey when I have already set title color to yellow.
Can you please allow us to add version while installing pod because the demo code doesn't have that issue. if we can install pod to that particular version then it would be helpful.
Missing content from Readme
Its just hangs my whole App as soon as I start typing.
its show me only default messages, and when I changed it, still the same, now changing happens
Using v2.0.0
import AnimatedField
....
lazy var usernameTextField = AnimatedField()
let textInputFormatting: AnimatedFieldFormat = {
var format = AnimatedFieldFormat()
format.titleAlwaysVisible = false
format.titleFont = UIFont.systemFont(ofSize: 13, weight: .regular)
format.titleColor = UIColor.lightGray
format.textFont = UIFont.systemFont(ofSize: 16, weight: .regular)
format.textColor = UIColor.darkGray
/// Font for counter
format.counterFont = UIFont.systemFont(ofSize: 13, weight: .regular)
format.counterColor = UIColor.darkGray
format.lineColor = UIColor.lightGray
format.alertEnabled = true
format.alertFont = UIFont.systemFont(ofSize: 13, weight: .regular)
format.alertColor = UIColor.red
format.alertFieldActive = true
format.alertLineActive = true
format.alertTitleActive = true
format.alertPosition = .top
/// Enable counter label
format.counterEnabled = false
format.countDown = false
return format
}()
usernameTextField.format = textInputFormatting
usernameTextField.placeholder = "Username".localized()
// add to view
....
private func isUserNameValid() -> Bool {
let enteredUsername = usernameTextField.text ?? ""
if (enteredUsername.isWhitespace) {
usernameTextField.showAlert("Email cannot be blank")
return false
}
if (!enteredUsername.isValidEmail) {
usernameTextField.showAlert("Invalid e-mail address")
return false
}
usernameTextField.showAlert("")
return true
}
Error messages covering the text entered:
The placeholder goes away when showing an error message
I wanna decrease line height in aniatedfield format
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.