第一步,下载SDWebImage,导入工程。github托管地址https://github.com/rs/SDWebImage 第二步,在需要的地方导入头文件 1 #import "UIImageView+WebCache.h" 1 #import "UIImageView+WebCache.h" ...
分类:
移动开发 时间:
2016-06-16 23:05:01
阅读次数:
250
(1)userInteractionEnabled 属性 @property(nonatomic, getter=isUserInteractionEnabled) BOOL userInteractionEnabled userInteractionEnabled的getter方法是isUserI ...
分类:
其他好文 时间:
2016-06-15 16:06:13
阅读次数:
96
1、软编码和硬编码如何区分 软编码:使用CPU进行编码 硬编码:使用非CPU进行编码,如显卡GPU、专用的DSP、FPGA、ASIC芯片等 2、连续的动画 NSOperationQueue 串行UIview和CAlayer 的动画 3、UIImageView UIImageView setAnima ...
分类:
移动开发 时间:
2016-06-15 10:55:12
阅读次数:
286
最近从上一家公司辞职,一直处于待业状态,顺便再家里带带闺女,今天有时间,所以写点东西,希望刚开始接触iOS开发的小白能够有所收获。 在iOS开发中圆角图片很常见,但是我们一般在设置图片圆角的时候几乎都是这样设置的: UIImageView *image = [[UIImageView alloc]i ...
分类:
移动开发 时间:
2016-06-13 22:08:47
阅读次数:
396
一,效果图。 二,代码。 RootViewController.m - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view. UIImageView *imageView ...
分类:
其他好文 时间:
2016-06-12 09:30:15
阅读次数:
143
一,写在前面
项目开发中,有时我们需要对UIImageView的contentModel属性做设置,来让图片以不同的方式,显示在UIImageView中. 比如让图片适应,UIImageView; 让UIImageView适应图片来显示等等.
二,了解contentMode
@property(nonatomic) UIViewContentMode contentMode; ...
分类:
其他好文 时间:
2016-06-12 03:17:08
阅读次数:
540
#import "UIImageView+WebCache.h" [self.HMImageView sd_setImageWithURL:url placeholderImage:nil options:0 progress:^(NSInteger receivedSize, NSInteger ...
分类:
编程语言 时间:
2016-06-11 14:26:19
阅读次数:
110
第一步:#import "UIImageView+WebCache.h" 第二步:[self.iconImageview sd_setImageWithURL:[NSURL URLWithString:model.icon]]; 2. 使用layoutSubviews记得[super layoutS ...
分类:
编程语言 时间:
2016-06-11 12:00:41
阅读次数:
136
代码创建 /** 创建UIImageView */ UIImageView * imageView=[[UIImageView alloc]init]; /** 设置尺寸位置 */ imageView.frame=(CGRect){{50,50},{230,230}}; /** 创建图片 */ UI ...
分类:
其他好文 时间:
2016-06-06 22:08:21
阅读次数:
429
里面外面都变成圆角 不用图片 直接改变layer 重点是里面外面都是圆角哦 for (UIImageView * imageview in self.progress.subviews) { imageview.layer.cornerRadius = 5; imageview.clipsToBou ...
分类:
其他好文 时间:
2016-06-06 16:41:55
阅读次数:
608