最新文章列表

[ios]UIImageView的常用方法

UIImageView的常用方法 UIImage *oneImage = [UIImage imageNamed:@"max.png"]; // 使用ImageView通过name找到图片 UIImageView *oneImageView = [[UIImageView alloc] initWithImage:oneImage]; //把on ...
繁星水 评论(0) 有429人浏览 2017-05-05 15:57

UIImageView 旋转

CABasicAnimation* rotationAnimation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"]; rotationAnimation.toValue = [NSNumber numberWithFloat:(DEGREES_TO_RADIANS(360))]; r ...
xyxdasnjss 评论(0) 有1098人浏览 2012-08-28 19:19

UIImageView中使用gif

UIImageView是不支持gif图片的,本文提供了一个自定义的View用来显示gif图片。   调用方法如下所示,核心代码请参考附件。   NSString *filePath = [[NSBundle mainBundle] pathForResource:@"1.gif" ofType:nil]; SCGIFImageView *gifImageView = [ ...
jsntghf 评论(0) 有2756人浏览 2012-08-17 19:56

给UIImageview 添加边框 或者设置成圆角

代码如下 //设置layer CALayer *layer=[backView layer]; //是否设置边框以及是否可见 [layer setMasksToBounds:YES]; //设置边框圆角的弧度 [layer setCornerRadius:10.0]; //设置边框线的宽 // [la ...
yourgame 评论(0) 有9366人浏览 2012-01-12 14:33

怎样使图片填充且不变形呢? so easy!

//设置UIImageView的对象的以下两个属性,可以图片不变形且充满图片框为前提进行填充。 imageview.clipsToBounds = YES; imageview.contentMode = UIViewContentModeScaleAspectFill; 转载自:http://blog.sina.com.cn/s/blog_699ebf3d0100oa39.h ...
yourgame 评论(0) 有3682人浏览 2012-01-12 01:25

给UIImageView加手势

默认情况下UIImageView是不支持事件的,要想给他加事件比较麻烦,通过在类中定义下面的方法就可以方便的位UIImageView加事件 imageTaped方法会被调用,在方法中做要处理的内容。 - (void) addGestureRecognizer:(UIImageView *)imageView{ UITapGestureRecognizer *singleTap = [[[U ...
yourgame 评论(0) 有2839人浏览 2012-01-10 00:41

最近博客热门TAG

Java(141741) C(73643) C++(68602) SQL(64557) C#(59604) XML(59131) HTML(59042) JavaScript(54916) .net(54782) Web(54511) 工作(54116) Linux(50906) Oracle(49861) 应用服务器(43285) Spring(40811) 编程(39452) Windows(39380) JSP(37540) MySQL(37266) 数据结构(36420)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics