UIImage
2016-03-12 21:11
351 查看
code
图片,和灰色边界的圆型图片
UIImageView *myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; [self.view addSubview: myImageView]; [myImageView release]; myImageView.image = [UIImage imageNamed:@"图片.jpg"]; // 制作圆形图片 myImageView.layer.masksToBounds = YES; myImageView.layer.cornerRadius = CGRectGetHeight(myImageView.bounds) / 2; myImageView.layer.borderWidth = 0.5f; myImageView.layer.borderColor = [[UIColor lightGrayColor] CGColor];
组图动画
UIImageVi a592 ew *myImageView = [[UIImageView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)]; [self.view addSubview: myImageView]; [myImageView release]; // 初始化一个用来装所有图片的空数组 NSMutableArray *picArr = [NSMutableArray array]; for (NSInteger i = 0; i < 组图的张数; i++) { NSString *picStr = [NSString stringWithFormat:@"图片"]; UIImage *image = [UIImage imageNamed: picStr]; [picArr addObject: image]; } myImageView.animationImages = picArr; myImageView.animationDuration = 1; myImageView.animationRepeatCount = 0; [myImageView startAnimating];
相关文章推荐
- Java 1.6 AbstractQueuedSynchronizer源码解析
- UIScrollViewDelegate
- 626A.Robot Sequence
- UICollectionView
- AJAX async:true(异步)或 false(同步)。
- iOS-UIScrollView和UIPageControl的综合实力,滚动图,轮播图
- java selenium (九) 常见web UI 元素操作 及API使用
- iOS— UIScrollView和 UIPageControl之间的那些事
- iOS 常用UI 部分常用 方法
- UIScrollView的属性总结
- android 6.0 SystemUI源码分析(5)-PowerUI介绍
- Infinite Sequence
- MFC-GUI绘图相关摘要
- UITextField
- 省市便利 UIPicherView
- UIButton
- UIGestureRecognizer介绍
- hdu3836 Equivalent Sets
- [3201]:Build a Fence
- UIView、UIResponder、UIAlertView、UIActionSheet