I used the codes below to set the background image of self.navigationItem.rightBarButtonItem
[self.navigationItem.rightBarButtonItem
setBackgroundImage: [UIImage imageNamed:@"top_button.png"]
forState:UIControlStateNormal
barMetrics:UIBarMetricsDefault];
it will cause crash,
I used Xcode 4.3, deploy target 4.0, iPhone os 4.3.3
It worked well on simulator 5.1, but crashed on device
Welcome any comment
That method is only available on devices running iOS 5.0.
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html