lionheart / LHSKeyboardAdjusting

An easy-to-use Objective-C protocol that automatically resizes / adjusts views when a keyboard appears on iOS.
http://lionheartsw.com
Apache License 2.0
100 stars 10 forks source link

Master #7

Closed ldrr closed 9 years ago

ldrr commented 9 years ago

removed warning and added animation

dlo commented 9 years ago

@ldrr Thanks for the contribution! Could you make this animation configurable?

ldrr commented 9 years ago

Because the animation duration and curve is defined by UIKit it's not necessary to configure the animation itself. It should animate like the appearance and disappearance from the keyboard itself.

dlo commented 9 years ago

That's great. I meant more specifically a way to specify whether the animation should happen at all.

ldrr commented 9 years ago

To be honest: no, absolutely not. Why should anyone turn off the animation when the keyboard appearance animation is turned on by UIKit? You can turn off animations with

    [UIView setAnimationsEnabled:NO];

Than the keyboard animation is turned off and the resizing will happen immediately.

ldrr commented 9 years ago

Hi @dlo, as you requested I added the animation option via protocol definition.

dlo commented 9 years ago

Thanks!