diff options
Diffstat (limited to 'UICaboodle/BrowserView.mm')
-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) |