[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to disable placeholder animation while entering text? #658

Closed
adeesh opened this issue Jan 16, 2017 · 12 comments
Closed

Is there a way to disable placeholder animation while entering text? #658

adeesh opened this issue Jan 16, 2017 · 12 comments
Assignees

Comments

@adeesh
Copy link
adeesh commented Jan 16, 2017

Hello,
I am new to Material library.

i have a custom requirement where i don't want to have animation where placeholder of text fields animates to top left. But i do need other feature of Textfield.

I tried looking into implementation of Text Field but didn't find anything concrete. Please suggest.

@daniel-jonathan
Copy link
Member

Hey :) Welcome.

There is this boolean:

textField.isPlaceholderAnimated = false

It wont animate, but will be at the top. Is that what you are looking for?

@adeesh
Copy link
Author
adeesh commented Jan 16, 2017

We don't want to show it on top when user types i.e. default behavior of UITextfield. But we do want to show error message like Material TextField provides.

@daniel-jonathan
Copy link
Member

So to confirm, you want the placeholder, but not the animation ? Or you don't want it at all. If you don't want it at all, you don't need to set it. Otherwise, I may need to consider this a feature request.

@adeesh
Copy link
Author
adeesh commented Jan 16, 2017

yes we want placeholder but not animation.

@daniel-jonathan
Copy link
Member

Okay that would be a feature request then. I can make that for you :)

@adeesh
Copy link
Author
adeesh commented Jan 16, 2017

Thanks Daniel for quick support.

@adeesh
Copy link
Author
adeesh commented Jan 16, 2017

How much time it usually take to add this type of feature?

@daniel-jonathan
Copy link
Member

I will make it work within the next couple days, latest the end of the week.

@daniel-jonathan
Copy link
Member

I will aim to get this out to you today.

@adeesh
Copy link
Author
adeesh commented Jan 20, 2017

Thanks Daniel for update

@daniel-jonathan
Copy link
Member

Hey, so the update is in Material 2.4.11. To use it, set the placeholderAnimation enum like so:

textField.placeholderAnimation = .hidden

That should do it :) All the best!

@adeesh
Copy link
Author
adeesh commented Jan 22, 2017

Thanks @DanielDahan , Its working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants