加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

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

发布时间:2020-12-14 18:55:16 所属栏目:百科 来源:网络整理
导读:抱歉英文不好:-( 在这里我使用 xcode 5和ios7,当在pushviewcontroller之后获取时,可以在后退按钮中改变颜色. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ListViewController *viewList = [[ListViewCo
抱歉英文不好:-(
在这里我使用 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];
}

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读