导航栏按钮设置

UIImage *aimage = [UIImage imageNamed:@"xxx"];

UIImage *image = [aimage imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];

UIBarButtonItem *rightItem = [[UIBarButtonItem alloc] initWithImage:image style:UIBarButtonItemStylePlain target:self action:@selector(action_rightClick:)];

[self.navigationItem setRightBarButtonItem:rightItem animated:YES];

图片尺寸要标准的44 * 44,或40 * 40

你可能感兴趣的:(导航栏按钮设置)