summaryrefslogtreecommitdiff
path: root/CyteKit
diff options
context:
space:
mode:
authorJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:58:44 -0800
committerJay Freeman (saurik) <saurik@saurik.com>2017-02-15 01:58:44 -0800
commitf274bb0c14b13e0e7bbf65fc5a07f40fcaa482cc (patch)
tree2409eeed52901b417948aea2b2137c42efa28f95 /CyteKit
parentcaa861bdca0452534fccc101228458f5cc6f41f2 (diff)
Hide custom function_ as an implementation detail.
Diffstat (limited to 'CyteKit')
-rw-r--r--CyteKit/WebViewController.h1
-rw-r--r--CyteKit/WebViewController.mm15
2 files changed, 4 insertions, 12 deletions
diff --git a/CyteKit/WebViewController.h b/CyteKit/WebViewController.h
index c8630d9..20fe475 100644
--- a/CyteKit/WebViewController.h
+++ b/CyteKit/WebViewController.h
@@ -121,7 +121,6 @@
- (void) customButtonClicked;
- (void) applyRightButton;
-- (UIBarButtonItem *) customButton;
- (UIBarButtonItem *) rightButton;
- (void) applyLeftButton;
diff --git a/CyteKit/WebViewController.mm b/CyteKit/WebViewController.mm
index 18b40d9..4f11b5d 100644
--- a/CyteKit/WebViewController.mm
+++ b/CyteKit/WebViewController.mm
@@ -793,9 +793,9 @@ float CYScrollViewDecelerationRateNormal;
- (UIBarButtonItem *) customButton {
if (custom_ == nil)
- return nil;
+ return [self rightButton];
else if ((/*clang:*/id) custom_ == [NSNull null])
- return (UIBarButtonItem *) [NSNull null];
+ return nil;
return [[[UIBarButtonItem alloc]
initWithTitle:static_cast<NSString *>(custom_.operator NSObject *())
@@ -848,14 +848,7 @@ float CYScrollViewDecelerationRateNormal;
[self applyLoadingTitle];
} else {
[indicator_ stopAnimating];
-
- UIBarButtonItem *button([self customButton]);
- if (button == nil)
- button = [self rightButton];
- else if (button == (UIBarButtonItem *) [NSNull null])
- button = nil;
-
- [[self navigationItem] setRightBarButtonItem:button animated:YES];
+ [[self navigationItem] setRightBarButtonItem:[self customButton] animated:YES];
}
}
@@ -920,7 +913,7 @@ float CYScrollViewDecelerationRateNormal;
initWithTitle:(kCFCoreFoundationVersionNumber >= 800 ? @" " : @" ")
style:UIBarButtonItemStylePlain
target:self
- action:@selector(reloadButtonClicked)
+ action:@selector(customButtonClicked)
] autorelease];
UIActivityIndicatorViewStyle style;