update keyboardMan.animateWhenKeyboardAppear consider subscribeView

This commit is contained in:
nixzhu
2015-12-01 18:35:35 +08:00
parent d1c9569975
commit 5fa506f7cc
@@ -676,6 +676,8 @@ class ConversationViewController: BaseViewController {
if let strongSelf = self {
let subscribeViewHeight = strongSelf.isSubscribeViewShowing ? SubscribeView.height : 0
if strongSelf.messageToolbarBottomConstraint.constant > 0 {
//
@@ -685,14 +687,14 @@ class ConversationViewController: BaseViewController {
strongSelf.conversationCollectionView.contentOffset.y += keyboardHeightIncrement
}
strongSelf.conversationCollectionView.contentInset.bottom = keyboardHeight + strongSelf.messageToolbar.frame.height
strongSelf.conversationCollectionView.contentInset.bottom = keyboardHeight + strongSelf.messageToolbar.frame.height + subscribeViewHeight
strongSelf.messageToolbarBottomConstraint.constant = keyboardHeight
strongSelf.view.layoutIfNeeded()
} else {
strongSelf.conversationCollectionView.contentOffset.y += keyboardHeightIncrement
strongSelf.conversationCollectionView.contentInset.bottom = keyboardHeight + strongSelf.messageToolbar.frame.height
strongSelf.conversationCollectionView.contentInset.bottom = keyboardHeight + strongSelf.messageToolbar.frame.height + subscribeViewHeight
strongSelf.messageToolbarBottomConstraint.constant = keyboardHeight
strongSelf.view.layoutIfNeeded()