]> git.saurik.com Git - cydia.git/commitdiff
Added cydia.setNavigationBarStyle().
authorJay Freeman (saurik) <saurik@saurik.com>
Thu, 24 Feb 2011 02:13:55 +0000 (18:13 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 7 Mar 2011 10:41:12 +0000 (02:41 -0800)
MobileCydia.mm
UICaboodle/BrowserView.mm

index d99a0e868073edb305d5540ba14a5489e3c460db..9364e3a4331d1ec2132f3486437488b757076b3c 100644 (file)
@@ -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;
 
index 2a05005a46bfe440b5c71e31a7f9a305708b8d60..b4ca1a12fe6803daade5019c23453d7cfc1b3cf4 100644 (file)
@@ -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];
 }