iiOS 开发基础:UIImageView属性
2016-03-11 22:55
453 查看
UIImageView属性
1.Image 设置图片,默认显示
UIImageView *_imageView = [[UIImageViewalloc]init];
_imageView.image = [UIImage
imageNamed:@"me.png"];
2.highlightedImage 设置高亮状态下显示的图片
_imageView.highlightedImage = [UIImageimageNamed:@"other.png"];
3.animationImages 设置序列帧动画的图片数组
[_imageViewsetAnimationImages:[NSArray
array]];
4.highlightedAnimationImages设置高亮状态下序列帧动画的图片数组
[_imageViewsetHighlightedAnimationImages:[NSArray
array]];
5.animationDuration 设置序列帧动画播放的时常
[_imageView setAnimationDuration:0.3f];6.animationRepeatCount 设置序列帧动画播放的次数
[_imageView setAnimationRepeatCount:2];7.userInteractionEnabled设置是否允许用户交互,默认不允许用户交互
[_imageViewsetUserInteractionEnabled:YES];
8.highlighted 设置是否为高亮状态,默认为普通状态
_imageView.highlightedImage = [UIImageimageNamed:@"other.png"];
[_imageView setHighlighted:YES];
注意的是在highlighted状态下设置的图片与序列帧动画要显示,必须同时设置UIImageView的状态为highlighted。
相关文章推荐
- iOS开发基础 :UIButton属性
- String ,Stringbuffer ,StringBuilder;
- Android子线程中更新UI的3种方法
- iOS开发--UIPickerView(选择器控件) 省份和城市的做法
- UINavigationController导航控制器
- 最新OSSIM改装平台DEMO WebUI
- bind 的第三方性能测试工具 queryperf
- UITableView和UICollectionView列表出现重叠问题
- iOS--UIAlertView与UIAlertController和UIAlertAction之间的事儿
- UIPickerView
- iOS UIPickerView 显示全国省市
- UESTC 250 windy数
- iOS 开源项目介绍之UI篇
- 滚动视图UIScrollView
- UI--UIControl控制器
- UIPickerView简单应用
- UIScrollView的简单使用
- Sublim 3中设置新的builid system
- 关于UIButton的一些用法
- leetcode 63. Unique Paths II | Java最短代码实现