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

Show and Hide Blocks not working? #11

Closed inPhilly closed 8 years ago

inPhilly commented 8 years ago

If I subclass lhs_activateKeyboardAdjustment, adding a show block and a hide block, those blocks pass as NSGlobalBlock but they do not execute. How is this feature meant to be used?

newmanw commented 8 years ago

I am also having problems with the show/hide blocks.

This works:

[self lhs_activateKeyboardAdjustment];

However this does not:

[self lhs_activateKeyboardAdjustmentWithShow:^{
    NSLog(@"Showing keyboard");
} hide:^{
    NSLog(@"Hiding keyboard");
}];

When using the latter, the keyboard notification never fires.

dlo commented 8 years ago

Thanks @mommyme + @newmanw, looking into it now.

dlo commented 8 years ago

Just fixed, will go out in the next release.

dlo commented 8 years ago

Alright, 2.0.0 is released. It contains some API updates (IMO, for the better). Go through the README and let me know if you see any issues.