Donc, grâce à la réponse de @ eagle.dan.1349, j'ai trouvé une idée: je prolonge la hauteur de l'arrière-plan de la barre de navigation pour inclure la hauteur de la barre d'état, puis je commence à dessiner l'image d'arrière-plan de la baisse pour quitter l'espace Pour la barre d'état:
+ (UIImage *)createTopBar: (UIDeviceOrientation) orientation {
// Create a new image context
CGSize size;
if (orientation == UIInterfaceOrientationLandscapeLeft || orientation == UIInterfaceOrientationLandscapeRight){
if ([UIDevice isiPhone5]) {
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7){
size = CGSizeMake(568, 34);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(568, 54), NO, 0.0);
}
else {
size = CGSizeMake(568, 34);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(568, 34), NO, 0.0);
}
}
else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
size = CGSizeMake(1024, 44);
UIGraphicsBeginImageContextWithOptions(size, NO, 0.0);
}
else {
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 7){
size = CGSizeMake(480, 34);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(480, 54), NO, 0.0);
}
else {
size = CGSizeMake(480, 34);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(480, 34), NO, 0.0);
}
}
}
else{
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
size = CGSizeMake(768, 44);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(768, 44), NO, 0.0);
}
else if ([UIDevice isiPhone5]) {
size = CGSizeMake(320, 44);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(320, 44), NO, 0.0);
}
else {
size = CGSizeMake(320, 44);
UIGraphicsBeginImageContextWithOptions(CGSizeMake(320, 44), NO, 0.0);
}
}
UIImage * image = [UIImage imageNamed: @"top_bar_without_title"];
if ((orientation == UIInterfaceOrientationLandscapeLeft ||
orientation == UIInterfaceOrientationLandscapeRight) &&
[[[UIDevice currentDevice] systemVersion] floatValue] >= 7){
[[UIColor blackColor] set];
UIRectFill(CGRectMake(0, 0, size.width, 40));
[image drawInRect:CGRectMake(0, 20, size.width, size.height+4)];
}
else {
[image drawInRect:CGRectMake(0, 0, size.width, size.height+4)];
}
UIImage * destImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return destImage;
}
Et le tour est joué, ça marche comme un charme! J'espère vraiment que cela pourrait être utile pour quelqu'un qui essaie de conserver le style de barre de statut de l'iOS 6 comme moi.