IOS开发 IOS7中使用图片作为导航栏返回按钮的背景

        self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil];
        [self.navigationController.navigationBar setBackIndicatorImage:[[UIImage imageNamed:@"sport_return_button"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
        [self.navigationController.navigationBar setBackIndicatorTransitionMaskImage:[[UIImage imageNamed:@"sport_return_button"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];

(IOS7)其他的使用图片做导航栏按钮:

        UIBarButtonItem *right = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"sport_add_button"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStylePlain target:self action:@selector(updatePedometer)];
        self.navigationItem.rightBarButtonItem = right;


如何在IOS6上使用图片来做返回按钮呢?


你可能感兴趣的:(ios开发,导航栏返回按钮样式)