iPhone开发--隐藏navigationItem的左侧返回按钮

来源:互联网 发布:做蛋糕的软件 编辑:程序博客网 时间:2024/06/09 15:57

因为项目的需要,隐藏navigationControll左侧的回退按钮,于是写了如下代码:

[cpp] view plaincopy
  1. self.navigationItem.leftBarButtonItem = nil;  

发现不起作用,于是乎有了如下的代码:

[cpp] view plaincopy
  1. self.navigationItem.hidesBackButton = YES;  

哈,返回按钮隐藏了。

参考:http://stackoverflow.com/questions/1226294/hiding-uinavigationitems-bar-butto

0 0
原创粉丝点击