在实现手势识别器之前 需要建立 一个UIImageView来存放图片
原代码:
UIImage *image =[UIImage imageNamed:@"图片名.后缀"];
self.imageView =[[UIImageView alloc ] initWithImage:image];
self.imageView.frame =CGRectMake(30, 100...
分类:
其他好文 时间:
2015-08-06 09:30:11
阅读次数:
168
app 头像设置,做成圆形的越来越多。而实现并不是很难,但是图像处理好很重要。
UIImageView *imgV = [[UIImageView alloc]initWithFrame:CGRectMake(200,100 , 100, 100)];
UIImage *image = [UIImage imageNamed:@"1"];
imgV.image = image;
...
分类:
移动开发 时间:
2015-08-04 17:15:03
阅读次数:
216
效果图
将一张图片剪切成圆形
在图片周围显示指定宽度和颜色的边框
实现思路
效果图中主要由不同尺寸的两大部分组成
蓝色的背景区域,尺寸等于图片的尺寸加上边框的尺寸
图片区域,尺寸等于图片的尺寸
绘制一个圆形背景区域,用边框颜色填充
绘制一个圆形的图片区域,设置不显示超出的部分
实现步骤
加载需要显示的图片UIImage *image = [UIImage imageNamed:@"资源中图片的名字...
分类:
移动开发 时间:
2015-08-02 21:36:29
阅读次数:
197
UIImageView属性1.Image 设置图片,默认显示UIImageView *_imageView = [[UIImageView alloc]init];_imageView.image = [UIImage imageNamed:@"me.png"];2.highlightedImage...
分类:
移动开发 时间:
2015-08-01 18:49:35
阅读次数:
196
1、利用"UIImageView+WebCache.h"加载图片数据 例如: UIImage *placeHolderImg = [UIImage imageNamed:@"avatar_default_small"]; [cell.imageView sd_setImageWithURL:...
分类:
Web程序 时间:
2015-07-31 21:52:02
阅读次数:
228
UIImage *img =[UIImage imageNamed:@"我的1.png"]; UIImage *img2 =[UIImage imageNamed:@"我的.png"]; self.tabBarItem.selectedImage =[img imageWithR...
分类:
其他好文 时间:
2015-07-31 17:59:33
阅读次数:
90
今天突然想到自己工程里面要用到这块,所以自己也整理了一下,留着备用,自己从网上下载了张gif的图片,拿来测试下
方法一: //设置位置和大小 把图片放在webView上播放
CGRect frame=CGRectMake(50, 50, 60,60);
frame.size=[UIImage imageNamed:@"animation.gif"]...
分类:
移动开发 时间:
2015-07-31 16:22:50
阅读次数:
145
为barbuttonitem设置图片时,xcode自动对图片进行渲染。如果想要使用原图的话——如下{ UIImage *leftImg = [UIImage imageNamed:@"leftbutton"]; leftImg = [leftImg imageWithRenderingMode:.....
分类:
移动开发 时间:
2015-07-30 21:11:15
阅读次数:
125
UIImage有五个类方法,用来创建UIImage的。下面介绍一下每个类方法的作用和创建实例。...
分类:
其他好文 时间:
2015-07-28 10:47:23
阅读次数:
162
fristNav.tabBarItem.image = [[UIImage imageNamed:@"index_tab_010.png"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]; fristNav.tab...
分类:
其他好文 时间:
2015-07-28 10:15:48
阅读次数:
77