diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 18:13:55 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:12 -0800 |
commit | 824062172d3effbead0e24eaae0ba60f7eb86969 (patch) | |
tree | 5a2c70b92b5f9613b70cb90b42a123a59cf27cf1 | |
parent | b8a5d89d89d8662536b2f651fae0598f21ea17bd (diff) |
Added cydia.setNavigationBarStyle().
-rw-r--r-- | MobileCydia.mm | 6 | ||||
-rw-r--r-- | UICaboodle/BrowserView.mm | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index d99a0e8..9364e3a 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4116,6 +4116,8 @@ static NSString *Warning_; return @"setButtonTitle"; else if (selector == @selector(setHidesBackButton:)) return @"setHidesBackButton"; + else if (selector == @selector(setNavigationBarStyle:)) + return @"setNavigationBarStyle"; else if (selector == @selector(setPopupHook:)) return @"setPopupHook"; else if (selector == @selector(setToken:)) @@ -4284,6 +4286,10 @@ static NSString *Warning_; [indirect_ performSelectorOnMainThread:@selector(setHidesBackButtonByNumber:) withObject:value waitUntilDone:NO]; } +- (void) setNavigationBarStyle:(NSString *)value { + [indirect_ performSelectorOnMainThread:@selector(setNavigationBarStyle:) withObject:value waitUntilDone:NO]; +} + - (void) _setToken:(NSString *)token { Token_ = token; diff --git a/UICaboodle/BrowserView.mm b/UICaboodle/BrowserView.mm index 2a05005..b4ca1a1 100644 --- a/UICaboodle/BrowserView.mm +++ b/UICaboodle/BrowserView.mm @@ -1170,6 +1170,16 @@ static void $UIWebViewWebViewDelegate$webViewClose$(UIWebViewWebViewDelegate *se return 980; } +- (void) setNavigationBarStyle:(NSString *)name { + UIBarStyle style; + if ([name isEqualToString:@"Black"]) + style = UIBarStyleBlack; + else + style = UIBarStyleDefault; + + [[[self navigationController] navigationBar] setBarStyle:style]; +} + - (void) setHidesBackButton:(bool)value { [[self navigationItem] setHidesBackButton:value]; } |