Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>KeyBoardTest.xcscheme</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ - (void)keyboardNotify:(NSNotification *)notify{
if ([notify.name isEqualToString:UIKeyboardWillShowNotification]) {//键盘显示
[self findFirstResponse:self.view];
UIView * tempView = self.objectView;
CGRect rect = [tempView.superview convertRect:tempView.frame fromView:self.view];//计算响应者到和屏幕的绝对位置
CGRect rect = [tempView.superview convertRect:tempView.frame toView:nil];//计算响应者到和屏幕的绝对位置
CGPoint point = rect.origin;
CGFloat keyboardY = APPWINDOWHEIGHT - keyboardHeight;
CGFloat tempHeight = point.y + tempView.frame.size.height;
Expand Down