Skip to content

Commit 2aa57ae

Browse files
committed
fix: 移动高度问题
1 parent be48918 commit 2aa57ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

IQKeyboardManager/IQKeyboardManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ -(void)adjustPosition
788788
CGFloat visibleHeight = CGRectGetHeight(keyWindow.frame)-kbSize.height;
789789

790790
CGFloat topMovement = CGRectGetMinY(textFieldViewRectInRootSuperview)-topLayoutGuide;
791-
CGFloat bottomMovement = CGRectGetMaxY(textFieldViewRectInWindow) - visibleHeight + bottomLayoutGuide;
791+
CGFloat bottomMovement = MAX(kbSize.height - (CGRectGetHeight(keyWindow.frame) - CGRectGetMaxY(textFieldViewRectInWindow)) - bottomLayoutGuide, 0); //CGRectGetMaxY(textFieldViewRectInWindow) - visibleHeight + bottomLayoutGuide;
792792
moveUp = MIN(topMovement, bottomMovement);
793793
}
794794

0 commit comments

Comments
 (0)