//获取所有UIBarButton的外观 UIBarButtonItem *buttonItem=[UIBarButtonItem appearance]; [buttonItem setBackgroundImage:[UIImage imageNamed:@"NavButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [buttonItem setBackgroundImage:[UIImage imageNamed:@"NavButton"] forState:UIControlStateHighlighted barMetrics:UIBarMetricsDefault]; //设置返回按钮 [buttonItem setBackButtonBackgroundImage:[UIImage imageNamed:@"NavBackButton"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [buttonItem setBackButtonBackgroundImage:[UIImage imageNamed:@"NavBackButtonPressed"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
|