We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6ccdcf commit bcd2a3eCopy full SHA for bcd2a3e
1 file changed
KeyboardConstraint/KeyboardAdjustConstraint.m
@@ -59,6 +59,18 @@ - (void)_keyboardDidChangeVisible:(NSNotification *)notification
59
keyboardHeight = intersection.size.height;
60
}
61
62
+ // If one of the constraint items is a layout guide; subtract it's length:
63
+
64
+ if (notification.name == UIKeyboardWillShowNotification) {
65
+ if ([self.firstItem conformsToProtocol:@protocol(UILayoutSupport)]) {
66
+ id<UILayoutSupport> layoutGuide = self.firstItem;
67
+ keyboardHeight -= layoutGuide.length;
68
+ } else if ([self.secondItem conformsToProtocol:@protocol(UILayoutSupport)]) {
69
+ id<UILayoutSupport> layoutGuide = self.secondItem;
70
71
+ }
72
73
74
if (superview) {
75
//Force layout before animation...
76
[CATransaction begin];
0 commit comments