From 4fe4bdc33ed8d35c5171f90c2a2f9117f5ab5c24 Mon Sep 17 00:00:00 2001 From: Grant Paul Date: Sat, 11 Dec 2010 20:38:25 -0800 Subject: SpringBoard gets away with a completely fake status bar; Cydia can get away with a fake tab bar. --- MobileCydia.mm | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/MobileCydia.mm b/MobileCydia.mm index 6861e00..139b55b 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -8782,6 +8782,20 @@ static _finline void _setHomePage(Cydia *self) { [tabbar_ setViewControllers:controllers]; } +- (void)showFakeTabBarInView:(UIView *)view { + static UITabBar *fake = [[UITabBar alloc] initWithFrame:CGRectMake(0, 0, 0, 49.0f)]; + if (view != nil) { + CGRect frame = [fake frame]; + frame.origin.y = [view frame].size.height - frame.size.height; + frame.size.width = [view frame].size.width; + [fake setFrame:frame]; + [fake setAutoresizingMask:UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleTopMargin]; + [view addSubview:fake]; + } else { + [fake removeFromSuperview]; + } +} + - (void) applicationDidFinishLaunching:(id)unused { _trace(); CydiaApp = self; @@ -8807,9 +8821,7 @@ _trace(); essential_ = [[NSMutableArray alloc] initWithCapacity:4]; broken_ = [[NSMutableArray alloc] initWithCapacity:4]; - UIScreen *screen([UIScreen mainScreen]); - - window_ = [[UIWindow alloc] initWithFrame:[screen bounds]]; + window_ = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; [window_ orderFront:self]; [window_ makeKey:self]; [window_ setHidden:NO]; @@ -8842,6 +8854,7 @@ _trace(); // Show pinstripes while loading data. [[tabbar_ view] setBackgroundColor:[UIColor pinStripeColor]]; + [self showFakeTabBarInView:[tabbar_ tabBar]]; [self performSelector:@selector(loadData) withObject:nil afterDelay:0]; _trace(); @@ -8904,6 +8917,8 @@ _trace(); _setHomePage(self); } + [self showFakeTabBarInView:nil]; + [starturl_ release]; starturl_ = nil; -- cgit v1.2.3