将编辑按钮的样式从表视图设置为普通(iphone sdk)
如何从表视图更改编辑按钮的样式?我用下面的代码尝试过,但它不起作用。
self.navigationItem.rightBarButtonItem = self.editButtonItem;
self.navigationItem.rightBarButtonItem.style = UIBarButtonItemStylePlain;
提前致谢。
肖恩
How can I change the style of a edit button from a table view? I tried it with the following code but it doesn't work.
self.navigationItem.rightBarButtonItem = self.editButtonItem;
self.navigationItem.rightBarButtonItem.style = UIBarButtonItemStylePlain;
Thanks in advance.
Sean
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是在 ViewDidLoad 中这样做吗?你不能随心所欲地改变按钮;必须有 UIView 更改才能触发更改。
Are you doing this in ViewDidLoad? You can't just change the button on a whim; there has to be a UIView change to trigger a change.