I have a toolbar and i would like to place it on top of the keyboard.
In the keyboardwillshow notification, i tried to add toolbar to the keyboard but no luck, i can
if you want to add tool bar on the keyboard, you are right place. You can use BSKeyboard easly. Look at the implementation below;
in .h file
#import "BSKeyboardControls.h"
add delegates
@interface ViewController : UIViewController
now jump the .m file , go to viewDidLoad. We will add textfield which i want to add tollbar
self.keyboardControls = [[BSKeyboardControls alloc] initWithFields:@[PINTextField]];
[self.keyboardControls addDelegate:self];
we should add activeField just like below,
- (void)textFieldDidBeginEditing:(UIView *)textField {
[self.keyboardControls setActiveField:textField];
}
And last step is delegate metods implemantation,
- (void)keyboardControlsDonePressed:(BSKeyboardControls *)keyboardControls {
[super textFieldShouldReturn:self.keyboardControls.activeField];
}
That's it.
For more info and download the BSKeyboard files, you can move the below link BSKeyboard Githup Link