Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Added property for autocorrection #97

Merged
merged 2 commits into from
Apr 30, 2018
Merged

Conversation

Tantalum73
Copy link
Contributor

By adressing issue #67, I added a property to set the UITextAutocorrectionType on the underlaying UITextField / UITextView.

Is is still turned off by default but the user now has the choice to turn it on.

By adressing issue jobandtalent#67, I added a property to set the UITextAutocorrectionType on the underlaying UITextField / UITextView.

Is is still turned off by default but the user now has the choice to turn it on.
Copy link
Contributor

@victorBaro victorBaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for submitting this PR, I really like it, nice and simple.
Please check my suggested change.


open var autocorrection: UITextAutocorrectionType = .no {
didSet {
configureType()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed? configureType() removes the whole view from its superview and generates a new input. I would simply do textInput.autocorrection = autocorrection.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, you are right.
I made the proposed change and will do the commit soon.

Not the entire text input is re-created but only its autocorrection property is updated when a change to the value is made.
@Tantalum73
Copy link
Contributor Author

Would you please review the changes that I've made after your correction-suggestion?

@victorBaro victorBaro merged commit c3209e9 into jobandtalent:master Apr 30, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants