jobandtalent / animatedtextinput Goto Github PK
View Code? Open in Web Editor NEWAnimated UITextField and UITextView replacement for iOS
License: MIT License
Animated UITextField and UITextView replacement for iOS
License: MIT License
Steps to reproduce the issue:
type = .standard
field till the text can't fit anymore into it.Expected result:
I need to use an AnimatedTextInput that presents a Phone Pad Keyboard Type.
Currently there is just the following:
I need a "Phone" type because .numeric does not allow to have the "+" symbol. The .numeric type has a "." symbol which is not on a phone pad.
Is there a way I can add this functionality to AnimatedTextInputFieldConfigurator by subclassing it? Im not sure... a bit new to swift.
I would appreciate some advice / pointers... Thanks
how to do i enable autocorrection?
[!] Unable to find a specification for AnimatedTextInput (~> 0.3.0)
[!] Unable to find a specification for AnimatedTextInput (~> 0.3.2)
[!] Unable to find a specification for AnimatedTextInput
How to reset text input after validation is true.
If we show validation error then later make it blank. The textField shows red line with no placeholder.
every time i try to install this pod it give me this error
[!] Unable to find a specification for AnimatedTextInput (~> 0.3.0)
Hi!
I write app without Storyboard, and create and place in view controls in code...
So... let lbName = AnimatedTextInput() ... if I begin use AnimatedTextInputDelegate compiler give me "Use of unresolved identifier 'AnimatedTextInput' ". But when I Use Storyboard delegate works perfect!
How to resolve this issue?
Thanks!
How to delegate type multiline to UITextView ?
I want get shouldChangeCharactersInRange
It seems that there is a bug with the last version (0.4.0) with the .generic type.
I have two texts inputs :
One simple / default which become the first responder in view did load.
A second of generic type with a date/time picker and a tool bar (I used the code provided in #39).
Now if I click on the field, the date the picker is shaun as expected but the field isn't blue as it should.
Same thing if I force it to be the first responder It is blue but if I touch the first one, the blue tint does not disappear. This is doesn't append with other provided types.
Here is a small vc code which demonstrate the bug :
class NewEventController : UIViewController
{
@IBOutlet weak var titleTextInputView: AnimatedTextInput!
{
didSet
{
titleTextInputView.placeHolderText = "Title"
}
}
@IBOutlet weak var dateTextInputView: AnimatedTextInput!
{
didSet
{
// TOOLBAR
let toolBar = UIToolbar()
toolBar.barStyle = UIBarStyle.default
toolBar.isTranslucent = true
toolBar.tintColor = UIColor.black
toolBar.sizeToFit()
let doneButton = UIBarButtonItem(title: "Done", style: UIBarButtonItemStyle.plain, target: self, action: #selector(NewEventController.handleDoneButton(sender:)))
let spaceButton = UIBarButtonItem(barButtonSystemItem: UIBarButtonSystemItem.flexibleSpace, target: nil, action: nil)
toolBar.setItems([ spaceButton, doneButton], animated: false)
toolBar.isUserInteractionEnabled = true
// INPUTVIEW
let datePicker = UIDatePicker(frame: CGRect(x: 0, y: 0, width: 0, height: 0))
datePicker.datePickerMode = .dateAndTime
datePicker.backgroundColor = .white
datePicker.minimumDate = Date().adding(.minute, value: 5).nearestFiveMinutes
datePicker.minuteInterval = 5
datePicker.addTarget(self, action: #selector(NewEventController.datePickerValueChanged(sender:)), for: .valueChanged)
// ASSEMBLY
let myTextInput = DateTextInput()
myTextInput.inputView = datePicker
myTextInput.inputAccessoryView = toolBar
dateTextInputView.type = .generic(textInput: myTextInput)
// VALUES
dateTextInputView.placeHolderText = "Date"
updateDateField(with: datePicker.date)
}
}
override func viewDidLoad()
{
titleTextInputView.becomeFirstResponder()
}
func handleDoneButton(sender: UIButton)
{
_ = dateTextInputView.resignFirstResponder()
}
func datePickerValueChanged(sender: UIDatePicker)
{
updateDateField(with: sender.date)
}
func updateDateField(with date : Date)
{
let formatter = DateFormatter()
formatter.dateStyle = .long
formatter.timeStyle = .short
dateTextInputView.text = formatter.string(from: date)
}
}
class DateTextInput: UITextView, TextInput
{
var view: UIView
{
return self
}
var currentText: String?
{
get { return text }
set { self.text = newValue }
}
var currentSelectedTextRange: UITextRange?
{
get { return self.selectedTextRange }
set { self.selectedTextRange = newValue }
}
var textAttributes: [String: Any]?
{
didSet
{
guard let attributes = textAttributes else { return }
typingAttributes = attributes
}
}
weak var textInputDelegate: TextInputDelegate?
var currentBeginningOfDocument: UITextPosition?
{
return self.beginningOfDocument
}
func changeReturnKeyType(with newReturnKeyType: UIReturnKeyType)
{
returnKeyType = newReturnKeyType
}
func currentPosition(from: UITextPosition, offset: Int) -> UITextPosition?
{
return position(from: from, offset: offset)
}
}
How I can set textAligment of textfield to .right ?
inputView is get-only property.
Hey, I'd love to see this lib available in Swift 3 so I can implement it in my project.
Thanks 😄
How add multiline TextInput in UITableViewCell?
Thanks
I can't get delegate to call back for :
func animatedTextInput(animatedTextInput: AnimatedTextInput, shouldChangeCharactersInRange range: NSRange, replacementString string: String) -> Bool
and
func animatedTextInputDidBeginEditing(animatedTextInput: AnimatedTextInput)
The only one that seems to work is :
func animatedTextInputDidChange(animatedTextInput: AnimatedTextInput)
I have a table view where I show/hide the AnimatedTextInput. If i hide the textInput and scroll down and when again the textInput is shown, Placeholder and the labels goes missing. I check the values are still assigned to the textInput but not seen on UI.
When user makes a typo in the text and wants to fix it, the cursor will jump to the end of the string after first character change.
e.g.:
"sample misspleled text|" -> "sample missple|led text" -> delete 'e' -> "sample missplled text|"
Although everything is nice about this control. the background color in the placeholder does not go away. I understand that author published a version that removes it, but I was not able to get the update with pod
Thanks a lot in advance
I´ve been trying to implement toolbar for numeric keyboard since it doesn't have a return button, and i need it for my form
textInputs[0].type = .numeric
textInputs[0].inputAccessoryView = toolBar
at the moment of doing this is not setting the toolbar and it´s causing an error any ideas?
how can i set the text programmatically
I want something like this
textFieldInput.text = "my added text"
Hello,
Is there a way to change the keyboard button from "Intro" to "Done" ?
Thank you for your help
I want to give margin from right side. Its touched to the end right now.
How can i give the Margin from right side so i can make design more better as per Mock ?
The size of the font is always constant during typing and it's not using the Custom AnimatedTextInputStyle. This happens for .multiline style only...
Please add some access to content insets parameters in multiline mode. Something like that:
animatedInputText.textContainerInset = UIEdgeInsetsMake(10, 10, 10, 10)
When the textinput type is of Password type.
Step 1 : Type a password
Step 2 : Click on show/hide button(this shows the password)
Step 3 : Click on show/hide button(this secures the password string )
Step 4 : Type password
It overwrites over the previous password.
Suppose if user want to check if password is correct or not and start typing again. It doesn't work, user has to type in again.
When multiline textinput is added in a tableview cell.it doesnt resize or goto next line.
Hi Dear
Could you provide your library with Interface Builder Designer?
Best Regard
First of all, great work guys, new release finally fixed constrains warnings in console. But, this update broke counter label (you can simply look this in example). And another issue i just found with views which i tried to put over the AnimatedTextInput view (actually in AnimatedTextInput view stack via IB with auto layout usage), they are missed and i can't find them :). Just try it.
am trying to apply it on arabic language and want to show it right aligment but couldnt find anything in code to make right aligned
so is there any possible way to help me ?
Is there a way i can do something like this
textInputs[3].keyboardType = .phonePad
currently is not letting me
Nice control. Congratulations!
I think that a great improvement could be the option of change the line thickness. Currently it's very thin for my taste.
Another thing that I noticed that when I delete a character on a specific place the cursor return to the last character. I think that it's a better idea to leave the cursor on the same place. Make sense?
the class has a parameter or function for change the image on right side of textfield of type .selection?
Hello i am using IQKeyboardManager also how can i use it with AnimatedTextinput? @victorBaro
I have used this library I have find this very useful but I feel there is a minor bug when used the normal text input field and we want to delete some character after selecting the position like we have a text "HelloWorld" in the textfield and I want to delete the "e" from string I have selected the position and deleted "e" but cursor jumps at the end of string always please fix this I will be very thankful .
Hi,
first of all, congratulations for this project. Do I need know how align the text of textfield at right side, how I can do this?
Could i even change this value?
Can you please enable Carthage Support
Please add project file and share it to support carthage
Hi,
I'm actually using this beautiful textInput, and I have to change type from password to numeric password,
is there a way to choose type to .password combined with .numeric ?
thank you
Hello,
Is there a way to remove the bar above the keyboard that shows word suggestions?
Thanks for your time
Swift 3 branch is full of error . Please fix them
can the fields be added to a subview
multiline textfield showCharacterCounterLabel is not working on swift 3+ :-(
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.