@year 2012
@license CC-BY-3.0
@copyright Dmitry Ponomarev <demdxx@gmail.com>
Thanks for button images https://github.com/gavingmiller/evernote-show-hide-keyboard
#import "UIViewController+KeyboardClose.h"
@interface MyController : UIViewController
// ...
@end
...
@implementation MyController
#pragma mark UIViewController load/unload view events
- (void)viewWillAppear:(BOOL)animated
{
[self registerKeyboardCloseButtonForIphone];
/* ... */
[super viewWillAppear:animated];
}
- (void)viewWillDisappear:(BOOL)animated
{
[self unregisterKeyboardCloseButton];
/* ... */
[super viewWillDisappear:animated];
}
@end
NSHelpers by Dmitry Ponomarev <demdxx@gmail.com> is licensed under a Creative Commons Attribution 3.0 Unported License.
Based on a work at https://github.com/demdxx/NSHelpers.