We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
barcontroller之后,点击评论弹出键盘,输入框被键盘遮盖,手动改变_inputView的 Y 值无效。不使用uitabbarcontroller没问题,使用uitabbarcontroller之后就出现遮盖问题
The text was updated successfully, but these errors were encountered:
在CommentInputView.m里修改
#define InputViewHeightOffset 64 // the height of navigationBar -(void) addNotify { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onKeyboardShow:) name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onKeyboardHide:) name:UIKeyboardWillHideNotification object:nil]; } -(void) removeNotify { [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillShowNotification object:nil]; [[NSNotificationCenter defaultCenter] removeObserver:self name:UIKeyboardWillHideNotification object:nil]; } -(void) onKeyboardShow:(NSNotification *) notify // typo { NSDictionary *info = notify.userInfo; CGRect frame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; _keyboardAnimationDuration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; _keyboardAnimationCurve = [[info objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue]; [self changeInputViewOffsetY:(frame.origin.y - InputViewHeight - InputViewHeightOffset)]; } // change inputView when keyboard hide - (void) onKeyboardHide:(NSNotification *) notify { NSDictionary *info = notify.userInfo; CGRect frame = [[info objectForKey:UIKeyboardFrameEndUserInfoKey] CGRectValue]; _keyboardAnimationDuration = [[info objectForKey:UIKeyboardAnimationDurationUserInfoKey] doubleValue]; _keyboardAnimationCurve = [[info objectForKey:UIKeyboardAnimationCurveUserInfoKey] integerValue]; [self changeInputViewOffsetY:(frame.origin.y - InputViewHeight - InputViewHeightOffset) ]; }
Sorry, something went wrong.
No branches or pull requests
barcontroller之后,点击评论弹出键盘,输入框被键盘遮盖,手动改变_inputView的 Y 值无效。不使用uitabbarcontroller没问题,使用uitabbarcontroller之后就出现遮盖问题
The text was updated successfully, but these errors were encountered: