Skip to content

Commit

Permalink
Slightly less annoying keyboard animations when reclaiming first resp…
Browse files Browse the repository at this point in the history
…onder
  • Loading branch information
domesticcatsoftware committed May 31, 2012
1 parent a10d3de commit 9555122
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions DCIntrospect/DCIntrospect.m
Original file line number Diff line number Diff line change
Expand Up @@ -215,11 +215,12 @@ - (void)start
object:nil
queue:nil
usingBlock:^(NSNotification *notification) {
// needs to be done after a delay or else it doesn't work for some reason.
if (self.keyboardBindingsOn)
{
[self performSelector:@selector(takeFirstResponder)
withObject:nil
afterDelay:0.1];
withObject:nil
afterDelay:[[[notification userInfo] objectForKey:UIKeyboardAnimationDurationUserInfoKey] floatValue]];
}
}];

// dirty hack for UIWebView keyboard problems
Expand Down Expand Up @@ -288,7 +289,7 @@ - (void)invokeIntrospector
[self updateStatusBar];
[self updateFrameView];

if (keyboardBindingsOn)
if (self.keyboardBindingsOn)
[self.inputTextView becomeFirstResponder];
else
[self.inputTextView resignFirstResponder];
Expand Down

0 comments on commit 9555122

Please sign in to comment.