导航栏按钮图片颜色与设置的图片不一致

翻新老项目时,出现导航栏按钮图片颜色与设置的图片不一致情况,处理方法如下:

self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:loadImageByName(@"icon") style:UIBarButtonItemStyleDone target:self action:@selector(rightSetting:)];

    [self.navigationItem.rightBarButtonItem setImage:[loadImageByName(@"icon") imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];

你可能感兴趣的:(导航栏按钮图片颜色与设置的图片不一致)