I've created a custom input textView at the top of the system keyboard. When I set the textView becomeFirstResponder, there is a tiny spacing appears between my textView and the system keyboard.
So I create a new empty project and use the same code to test my custom input textView. guess what's happen? Everything goes well !!!
I'm really confused by this problem. Are there any settings I missed?
https://i.stack.imgur.com/rrR2I.png
Code:
- (void)createInputBarView{
UIToolbar *toolBar = [[UIToolbar alloc] initWithFrame: CGRectMake(0, 0, SCREEN_Width, 0)];
toolBar.hidden = YES;
QInputBarView *anInputBar = [[QInputBarView alloc] initWithFrame: CGRectMake(0, 0, SCREEN_Width, UIInputBarViewMinHeight)];
[anInputBar setupWithConfiguration: config];
[anInputBar setDelegate: self];
[anInputBar.inputTextView setInputAccessoryView: toolBar];
[self addBottomInputBarView: anInputBar];}
- (void)addBottomInputBarView:(UIView *)inputBarView {
inputBarView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin);
CGRect inputFrame = CGRectMake(0.0f,self.viewController.view.frame.size.height + (belowViewController ? 0 : (- inputBarView.frame.size.height - self.safeAreaInsetsBottom)),
self.viewController.view.frame.size.width,
inputBarView.frame.size.height);
inputBarView.frame = inputFrame;
[self.viewController.view addSubview:inputBarView];
[self.viewController.view bringSubviewToFront:inputBarView];
self.inputBarView = inputBarView;}