UIButton: set image for selected-highlighted state
来源:互联网 发布:淘宝流量来源有哪些 编辑:程序博客网 时间:2024/06/07 02:51
I set an images for button's states Normal,Highlighted and Selected, but when the button in selected state and I press/highlight it I didn't see my highlighted image but just grayed picture.Is it possible to set an image for highlighted state when the button selected?
my code:
[button setImage:[UIImage imageNamed:@"normal.png"] forState:UIControlStateNormal];[button setImage:[UIImage imageNamed:@"pressed.png"] forState:UIControlStateHighlighted];[button setImage:[UIImage imageNamed:@"checked.png"] forState:UIControlStateSelected];
when I do:
[button setSelected:YES];
and press the button, the "pressed.png" image doesn't select.
[button setImage:[UIImage imageNamed:@"pressed.png"] forState:UIControlStateSelected | UIControlStateHighlighted];
0 0
- UIButton: set image for selected-highlighted state
- UIButton: set image for selected-highlighted state
- cocoa touch——UIControl——state,highlighted,enabled,selected
- 关于UIButton的highlighted状态的总结
- iOS如何保持UIButton的Highlighted状态
- UIButton on the UIScrollView highlighted delayed
- UIbutton在UIScrollview中highlighted延迟
- ios uitableviewcell 添加uibutton无法Highlighted问题
- UIButton on the UIScrollView highlighted delay
- UIButton的selected状态
- Set image as background for a view
- IOS开发之 ---- UIButton on the UIScrollView highlighted delay
- UIButton高光状态(highlighted)时阴影效果
- UIButton高亮(highlighted)下的边框颜色(borderColor)
- jQuery Set Selected Option
- tab bar selected image invalid
- In a combobox, how do I determine the highlighted item (not selected item)?
- tableView中cell、collectionView中cell选中后,图片加上一层高亮效果 selected highlighted
- Java -Dfile.encoding=UTF-8的使用
- Tomcat集群与负载均衡
- iOS8开发~UI布局(二)storyboard中autolayout和size class的使用详解
- Python用subprocess的Popen来调用系统命令
- (app 上架问题)the app references non-public selectors in playload/app/app:expires
- UIButton: set image for selected-highlighted state
- Kernel low-level debugging functions linux汇编的调试方法
- android 解析json
- Spring 3.0 Required注解检查
- java实现二叉树
- JAVA中的for ( : )型循环
- IOS应用在iPhone5和iPhone5s上不能全屏显示,应用画面上下各有1条黑色的解决方案
- P2P,UDP和TCP穿透NAT
- jQuery对于事件的操作