X-Git-Url: https://git.saurik.com/cydia.git/blobdiff_plain/323746d39bfa3830194974658233d0b45809b060..c2493c4ee87eb8c1acc4c5b9c9494653186e9765:/CyteKit/ViewController.mm diff --git a/CyteKit/ViewController.mm b/CyteKit/ViewController.mm index a0365956..41e7ea9a 100644 --- a/CyteKit/ViewController.mm +++ b/CyteKit/ViewController.mm @@ -1,5 +1,5 @@ /* Cydia - iPhone UIKit Front-End for Debian APT - * Copyright (C) 2008-2013 Jay Freeman (saurik) + * Copyright (C) 2008-2015 Jay Freeman (saurik) */ /* GNU General Public License, Version 3 {{{ */ @@ -19,12 +19,15 @@ **/ /* }}} */ -#include "CyteKit/ViewController.h" +#include "CyteKit/UCPlatform.h" #include #include -extern bool IsWildcat_; +#include "CyteKit/ViewController.h" + +#include "iPhonePrivate.h" +#include @implementation UIViewController (Cydia) @@ -49,9 +52,24 @@ extern bool IsWildcat_; return nil; } +- (UIViewController *) rootViewController { + UIViewController *base(self); + while ([base parentOrPresentingViewController] != nil) + base = [base parentOrPresentingViewController]; + return base; +} + +- (NSURL *) navigationURL { + return nil; +} + @end -@implementation CyteViewController +@implementation CyteViewController { + _transient id delegate_; + BOOL loaded_; + _H color_; +} - (void) setDelegate:(id)delegate { delegate_ = delegate; @@ -102,12 +120,16 @@ extern bool IsWildcat_; [super unloadData]; } -- (NSURL *) navigationURL { - return nil; +- (void) setPageColor:(UIColor *)color { + if (color == nil) + color = [UIColor groupTableViewBackgroundColor]; + color_ = color; } -- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)orientation { - return IsWildcat_ || orientation == UIInterfaceOrientationPortrait; +- (UIColor *) pageColor { + return color_; } +#include "InterfaceOrientation.h" + @end