diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 02:48:22 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 02:48:55 -0800 |
commit | ed5566c758424fffb2204d93d93998d7fbc744b6 (patch) | |
tree | 023f9679780ded4a85ad70796065466174e4b9f3 /UICaboodle | |
parent | 46d3a5cfc2959b65fef514faa666d735b91afbc6 (diff) |
Add cydia.removeButton().
Diffstat (limited to 'UICaboodle')
-rw-r--r-- | UICaboodle/BrowserView.mm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index b5a7b90..07a92ee 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -584,7 +584,11 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se style_ = style; function_ = function; + [self performSelectorOnMainThread:@selector(applyRightButton) withObject:nil waitUntilDone:NO]; +} +- (void) removeButton { + custom_ = [NSNull null]; [self performSelectorOnMainThread:@selector(applyRightButton) withObject:nil waitUntilDone:NO]; } @@ -904,8 +908,8 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se } - (UIBarButtonItem *) customButton { - return [[[UIBarButtonItem alloc] - initWithTitle:custom_ + return custom_ == [NSNull null] ? nil : [[[UIBarButtonItem alloc] + initWithTitle:static_cast<NSString *>(custom_.operator NSObject *()) style:[self rightButtonStyle] target:self action:@selector(customButtonClicked) |