简体   繁体   English

动态更改工具栏按钮的图像

[英]Changing images of toolbar buttons dynamicaly

我有一个带有按钮的工具栏,其按钮的图像被设置为特定图像。当用户单击主视图中的按钮时,我想将工具栏按钮之一的图像更改为另一图像。我尝试了许多方法。没有错误,但工具栏没有任何变化。有什么建议吗?

There is a tutorial for this: How-to-change-a-uibarbuttonitem-in-the-iphone-toolbar 有一个针对此的教程: 如何在iPhone工具栏中更改uibarbuttonitem

This is a great tutorial because it goes over changing the images based on state as well. 这是一个很棒的教程,因为它还介绍了根据状态来更改图像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM