You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2013/03/08 07:30:05 UTC
ios commit: Retain cycle fix
Updated Branches:
refs/heads/master 97b89edfa -> 24cdf446c
Retain cycle fix
Project: http://git-wip-us.apache.org/repos/asf/cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-ios/commit/24cdf446
Tree: http://git-wip-us.apache.org/repos/asf/cordova-ios/tree/24cdf446
Diff: http://git-wip-us.apache.org/repos/asf/cordova-ios/diff/24cdf446
Branch: refs/heads/master
Commit: 24cdf446c9cfab2d50fc41886e9ffaa908db272d
Parents: 97b89ed
Author: Shazron Abdullah <sh...@apache.org>
Authored: Thu Mar 7 22:29:57 2013 -0800
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Thu Mar 7 22:29:57 2013 -0800
----------------------------------------------------------------------
CordovaLib/Classes/CDVViewController.m | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-ios/blob/24cdf446/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index dfeee6f..684a078 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -289,12 +289,13 @@
}
if (hideKeyboardFormAccessoryBar) {
+ __weak CDVViewController* weakSelf = self;
[[NSNotificationCenter defaultCenter] addObserverForName:UIKeyboardWillShowNotification
object:nil
queue:[NSOperationQueue mainQueue]
usingBlock:^(NSNotification * notification) {
// we can't hide it here because the accessory bar hasn't been created yet, so we delay on the queue
- [self performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil afterDelay:0];
+ [weakSelf performSelector:@selector(hideKeyboardFormAccessoryBar) withObject:nil afterDelay:0];
}];
}