Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #85 from jivesoftware/master

Fixing an issue where the in-call bar pushes the keyboard offscreen
  • Loading branch information...
commit bb137bb49c062d0fca4da354288275c8ba7837b3 2 parents 9467aa7 + d750a44
@danielamitay authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 DAKeyboardControl/DAKeyboardControl.m
View
12 DAKeyboardControl/DAKeyboardControl.m
@@ -141,7 +141,7 @@ - (CGRect)keyboardFrameInView
if (self.keyboardActiveView)
{
CGRect keyboardFrameInView = [self convertRect:self.keyboardActiveView.frame
- fromView:self.keyboardActiveView.window];
+ fromView:self.keyboardActiveView.superview];
return keyboardFrameInView;
}
else
@@ -375,7 +375,7 @@ - (void)observeValueForKeyPath:(NSString *)keyPath
if([keyPath isEqualToString:@"frame"] && object == self.keyboardActiveView)
{
CGRect keyboardEndFrameWindow = [[object valueForKeyPath:keyPath] CGRectValue];
- CGRect keyboardEndFrameView = [self convertRect:keyboardEndFrameWindow fromView:self.keyboardActiveView.window];
+ CGRect keyboardEndFrameView = [self convertRect:keyboardEndFrameWindow fromView:self.keyboardActiveView.superview];
if (CGRectEqualToRect(keyboardEndFrameView, self.previousKeyboardRect)) return;
@@ -435,8 +435,8 @@ - (void)panGestureDidChange:(UIPanGestureRecognizer *)gesture
}
CGFloat keyboardViewHeight = self.keyboardActiveView.bounds.size.height;
- CGFloat keyboardWindowHeight = self.keyboardActiveView.window.bounds.size.height;
- CGPoint touchLocationInKeyboardWindow = [gesture locationInView:self.keyboardActiveView.window];
+ CGFloat keyboardWindowHeight = self.keyboardActiveView.superview.bounds.size.height;
+ CGPoint touchLocationInKeyboardWindow = [gesture locationInView:self.keyboardActiveView.superview];
// If touch is inside trigger offset, then disable keyboard input
if (touchLocationInKeyboardWindow.y > keyboardWindowHeight - keyboardViewHeight - self.keyboardTriggerOffset)
@@ -738,8 +738,8 @@ - (void)setKeyboardOpened:(BOOL)keyboardOpened
- (BOOL)keyboardWillRecede
{
CGFloat keyboardViewHeight = self.keyboardActiveView.bounds.size.height;
- CGFloat keyboardWindowHeight = self.keyboardActiveView.window.bounds.size.height;
- CGPoint touchLocationInKeyboardWindow = [self.keyboardPanRecognizer locationInView:self.keyboardActiveView.window];
+ CGFloat keyboardWindowHeight = self.keyboardActiveView.superview.bounds.size.height;
+ CGPoint touchLocationInKeyboardWindow = [self.keyboardPanRecognizer locationInView:self.keyboardActiveView.superview];
CGFloat thresholdHeight = keyboardWindowHeight - keyboardViewHeight - self.keyboardTriggerOffset + 44.0f;
CGPoint velocity = [self.keyboardPanRecognizer velocityInView:self.keyboardActiveView];
Please sign in to comment.
Something went wrong with that request. Please try again.