iphone中按钮的触摸效果

[英]touch effect for Button in iphone


how can i just change the color,of a button when i set the focus on the button in iphone. I mean to say , for example we have 5 buttons, and i am just setting the focus on each of the button. i want those buttons to be higlighted with different color. but when press or touch up inside the utton, the navigation is made to the respective forms, that is set for that button.

当我把焦点放在iphone的按钮上时,我怎么能改变按钮的颜色呢?我的意思是,例如,我们有5个按钮,我只是把焦点放在每个按钮上。我想要那些钮扣用不同的颜色装饰。但当在utton内部按下或触摸时,导航就被设置为相应的表单,这是为那个按钮设置的。

2 个解决方案

#1


0  

you can write method, for example, let it be

你可以写方法,例如,顺其自然

- (void) changeButtonState:(UIButton*) buttonToChange;

then you can call it in your onBtnClk method for button you need. in that method you can change image for your button's UIControlStateNormal mode. and if I understand right, you can use toolbar or tabbar instead of buttons.

然后可以在onBtnClk方法中为需要的按钮调用它。在该方法中,您可以为按钮的UIControlStateNormal模式更改图像。如果我理解正确的话,你可以用工具栏或者表格栏代替按钮。

#2


0  

Guess you have already asked this issue differently here..

我想你在这里已经提出了不同的问题。

But have you checked the answer?? You can use any of those methods at your will!

你查过答案了吗?你可以任意使用这些方法!

智能推荐

注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:http://www.itdaan.com/blog/2009/11/24/72000c3f4418fad630dc48bba105ef88.html



 
© 2014-2019 ITdaan.com 粤ICP备14056181号  

赞助商广告