summaryrefslogtreecommitdiff
path: root/MobileCydia.mm
diff options
context:
space:
mode:
authorGrant Paul <chpwn@chpwn.com>2010-12-11 20:38:25 -0800
committerGrant Paul <chpwn@chpwn.com>2010-12-11 20:38:25 -0800
commit4fe4bdc33ed8d35c5171f90c2a2f9117f5ab5c24 (patch)
tree105215906fbc9df6c3da666abd31a38dd5103d67 /MobileCydia.mm
parent3fa7e9c42161ffd5f06f016ddc93845bd80d20b3 (diff)
SpringBoard gets away with a completely fake status bar; Cydia can get away with a fake tab bar.
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r--MobileCydia.mm21
1 files 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;