diff options
author | Jay Freeman (saurik) <saurik@saurik.com> | 2011-02-23 20:30:11 -0800 |
---|---|---|
committer | Jay Freeman (saurik) <saurik@saurik.com> | 2011-03-07 02:41:13 -0800 |
commit | 5cdfcd6ff1223d3200b8f8a051b07f137e353604 (patch) | |
tree | c89dc338739d2c28d2f771b1a5ed558ca559c56d /MobileCydia.mm | |
parent | 3c62d6548fe3f893f4e90bce73b2463cef8faccd (diff) |
Export cydia.setHidesNavigationBar() to JavaScript.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index 4751736..10fe44b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -4122,6 +4122,8 @@ static NSString *Warning_; return @"setButtonTitle"; else if (selector == @selector(setHidesBackButton:)) return @"setHidesBackButton"; + else if (selector == @selector(setHidesNavigationBar:)) + return @"setHidesNavigationBar"; else if (selector == @selector(setNavigationBarStyle:)) return @"setNavigationBarStyle"; else if (selector == @selector(setPopupHook:)) @@ -4292,6 +4294,10 @@ static NSString *Warning_; [indirect_ performSelectorOnMainThread:@selector(setHidesBackButtonByNumber:) withObject:value waitUntilDone:NO]; } +- (void) setHidesNavigationBar:(NSString *)value { + [indirect_ performSelectorOnMainThread:@selector(setHidesNavigationBarByNumber:) withObject:value waitUntilDone:NO]; +} + - (void) setNavigationBarStyle:(NSString *)value { [indirect_ performSelectorOnMainThread:@selector(setNavigationBarStyle:) withObject:value waitUntilDone:NO]; } @@ -6414,10 +6420,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { @implementation HomeController -+ (BOOL) shouldHideNavigationBar { - return NO; -} - - (id) init { if ((self = [super init]) != nil) { [self setURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/home/", UI_]]]; @@ -6456,20 +6458,6 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { [alert show]; } -- (void) viewWillDisappear:(BOOL)animated { - [super viewWillDisappear:animated]; - - if ([[self class] shouldHideNavigationBar]) - [[self navigationController] setNavigationBarHidden:NO animated:animated]; -} - -- (void) viewWillAppear:(BOOL)animated { - [super viewWillAppear:animated]; - - if ([[self class] shouldHideNavigationBar]) - [[self navigationController] setNavigationBarHidden:YES animated:animated]; -} - - (void) viewDidLoad { [[self navigationItem] setLeftBarButtonItem:[[[UIBarButtonItem alloc] initWithTitle:UCLocalize("ABOUT") |