微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

ios – 后退按钮在导航栏中没有变色

抱歉英文不好:-(
在这里我使用 xcode 5和ios7,当在pushviewcontroller之后获取时,可以在后退按钮中改变颜色.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
        ListViewController *viewList = [[ListViewController alloc] initWithNibName:@“ListViewController” bundle:nil];
        [self.navigationController pushViewController: viewList animated:YES];
}

用户按下一个单元格,然后会出现ListViewController.在导航栏中,右侧栏按钮显示为粉红色.但后栏按钮没有变色.请看下面我附上链接的屏幕截图.

我们可以在导航栏中更改颜色后退按钮吗?或者应该在后退按钮中添加图像?

解决方法

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
        ListViewController *viewList = [[ListViewController alloc] initWithNibName:@“ListViewController” bundle:nil];
        self.navigationController.navigationBar.tintColor=[UIColor readcolor]; //set color as you want…..
        [self.navigationController pushViewController: viewList animated:YES];
}

试试吧……快乐的代码:-)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐