seedante / TextFieldAnimationExtension

Animation for delete action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TextFieldAnimationExtension

Last week, @Joel Besada show an effect for code edit. It's cool and useless.

What about this effect on iOS input? I think shake effect is not good for input, if you rock users, they will delete your app and give one star on app store.

I explore some effects. Here is:

Default effect:

Delete Animation

Color Effect:

Color Animation

I don't think add effect on input is a good idea, but I still make a sample. You can custom input effect and in default it's disabled.

Input Animtion

A ha, Rock you. Don't use this in your app.

Rock You

Installation and Usage

It's an extension! Drag SDETextFieldExtension.swift into your project.

Enable effect:

textField.addSDEEffect()

Disable effect:

textField.removeSDEEffect()

Enable random color animation:

textField.colorDeleteAnimationEnabled = true

Input effect is disabled in default. You can enable and custom it:

textField.inputAnimationEnabled = true
textField.inputAnimationText = "❤️"//Accept the first letter

In theory, UITextView can do same thing. I will implement it if I am not busy and in a good mood.

About

Animation for delete action


Languages

Language:Swift 100.0%