J'essaie d'implémenter un fond d'image UINavigationBar personnalisé pour iOS 6 mais je n'ai pas de chance. Tout ce qu'il affiche est le normal d'Apple (sans bouton de retour). J'ai essayé le code suivant dans viewDidLoad (un à la fois):Personnalisé UINavigationBar Image
[[UINavigationBar appearance] setBackgroundImage:myImage forBarMetrics:UIBarMetricsDefault];
[self.navigationController.navigationBar setBackgroundImage:myImage forBarMetrics:UIBarMetricsDefault];
je présente la vue souhaitée par:
optionViewController *choose= [[optionViewController alloc] initWithNibName:@"optionViewController" bundle:nil];
UINavigationController *aNavController = [[UINavigationController alloc] initWithRootViewController:choose];
[self presentViewController: aNavController animated:YES completion:nil];
Toute aide serait appréciée. Merci!
Qu'arrive t-il? [self.navigationController.navigationBar setBackgroundImage: [UIImage imageNamed: @ "barImage.png"] pourBarMetrics: UIBarStyleDefault]; Cette commande fonctionne partout dans mon code, à la fois pour iOS5 et iOS6. –
@ LêQuýSang Rien ne se passe ... Il affiche simplement l'UINaviationBar de base typique et non l'image que je veux. Merci –