if( [[[UIDevicecurrentDevice] systemVersion] floatValue] >= 7.0f ) {
float statusBarHeight = [[UIApplicationsharedApplication] statusBarFrame].size.height;
for( UIView *v in [self.window subviews] ) {
CGRect rect = v.frame;
rect.origin.y += statusBarHeight;
v.frame = rect;
}
UIView *statusBarView = [[[UIViewalloc]initWithFrame:CGRectMake(0, 0, 320, 20)]autorelease];
statusBarView.backgroundColor = [UIColor colorWithHex:0xff7488];
[self.window addSubview:statusBarView];
}
float statusBarHeight = [[UIApplicationsharedApplication] statusBarFrame].size.height;
for( UIView *v in [self.window subviews] ) {
CGRect rect = v.frame;
rect.origin.y += statusBarHeight;
v.frame = rect;
}
UIView *statusBarView = [[[UIViewalloc]initWithFrame:CGRectMake(0, 0, 320, 20)]autorelease];
statusBarView.backgroundColor = [UIColor colorWithHex:0xff7488];
[self.window addSubview:statusBarView];
}