I am setting self.navigationItem.rightBarButtonItem = self.editButtonItem; in viewDidLoad this works perfect in iOS < 7 in 7 I get below, why isn't title centered? What am I doing wrong?
Also when there is a back button and it has not been clicked at least once I get:
After it is clicked I get:
The background of buttons is set in app delegate:
// Change the appearance of back button
UIImage *backButtonImage = [[UIImage imageNamed:@"backbtn"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 13, 0, 6)];
[[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
// Change the appearance of other navigation button
UIImage *barButtonImage = [[UIImage imageNamed:@"btn"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 6, 0, 6)];
[[UIBarButtonItem appearance] setBackgroundImage:barButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];