0
En utilisant le code suivant pour définir une navigation globale bouton retour d'image:iOS 7 image setBackButtonBackgroundImage est toujours étirée
float imageSize = 21.5; // @2x is 43px width
UIImage *barBackBtnImg = [[UIImage imageNamed:@"arrow-back-white"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, imageSize, 0, 0)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:barBackBtnImg
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
[[UIBarButtonItem appearance] setBackButtonTitlePositionAdjustment:UIOffsetMake(0, -60)
forBarMetrics:UIBarMetricsDefault];
image originale: http://cl.ly/XJgD et en application (être étirées): http://cl.ly/XKc0
Toutes les idées pourquoi l'image est encore étirée?
Très bonne solution, merci! – Alex
J'ai dû utiliser l'affectation directe de paramètres, comme ceci: UINavigationBar.appearance(). BackIndicatorImage = UIImage (nommé: "btn-back"); UINavigationBar.appearance(). BackIndicatorTransitionMaskImage = UIImage (nommé: "btn-back"); UINavigationBar.appearance(). TintColor = UIColor.blackColor(); – Jonauz
Bonne solution. Merci – Kit