ios基本控件之UIImageView
2016-01-18 13:28
411 查看
_imageView.image = [UIImage imageNamed:@"me.png"];
[_imageView setHighlighted:YES];
注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。
UIImageView属性
1.Image 设置图片,默认显示
UIImageView *_imageView = [[UIImageView alloc]init];_imageView.image = [UIImage imageNamed:@"me.png"];
2.highlightedImage 设置高亮状态下显示的图片
_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];3.animationImages 设置序列帧动画的图片数组
[_imageView setAnimationImages:[NSArray array]];4.highlightedAnimationImages 设置高亮状态下序列帧动画的图片数组
[_imageView setHighlightedAnimationImages:[NSArray array]];5.animationDuration 设置序列帧动画播放的时常
[_imageView setAnimationDuration:0.3f];6.animationRepeatCount 设置序列帧动画播放的次数
[_imageView setAnimationRepeatCount:2];7.userInteractionEnabled 设置是否允许用户交互,默认不允许用户交互
[_imageView setUserInteractionEnabled:YES];8.highlighted 设置是否为高亮状态,默认为普通状态
_imageView.highlightedImage = [UIImage imageNamed:@"other.png"];[_imageView setHighlighted:YES];
注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。
相关文章推荐
- QUiLoader 动态加载.ui文件
- ios基本控件之UIImagePickerController
- ios基本控件之UIDatePicker
- ios基本控件之UIControl
- ios基本控件之UIButton
- ios基本控件之UIAlertView
- ios基本控件之UIActivityIndicatorView
- amazon oa2 - insert a value into a cycled linked list
- iOS9之后支付宝的回调以及iOS8之后提示框UIAlertController
- UILabel设置富文本格式显示
- 在线安装maven插件问题:Cannot complete the install because one or more required items could not be found.
- 素材收集整理
- UICollectionView瀑布流的实现,带例子
- The server quit without updating PID file (mysql.pid)一次意外mysql停止运行备忘录
- UILabel 简单的富文本
- 如何通过代理之道UItableView上cell上面的button点击的是哪一行的
- java_easyui体系之DataGrid(4)[转]
- iOS 隐藏单个页面的UITabBar
- 微软COM中GUID和UUID、CLSID、IID
- java_easyui体系之DataGrid(3)[转]