最新文章列表

[ios]UIImageView的常用方法

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

UIImageView 旋转

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

UIImageView中使用gif

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

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

代码如下 //设置layer CALayer *layer=[backView layer]; //是否设置边框以及是否可见 [layer setMasksToBounds:YES]; //设置边框圆角的弧度 [layer setCornerRadius:10.0]; //设置边框线的宽 // [la ...
yourgame 评论(0) 有9293人浏览 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) 有3576人浏览 2012-01-12 01:25

给UIImageView加手势

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

最近博客热门TAG

Java(141744) C(73651) C++(68608) SQL(64571) C#(59609) XML(59133) HTML(59043) JavaScript(54919) .net(54785) Web(54514) 工作(54118) Linux(50905) Oracle(49875) 应用服务器(43289) Spring(40812) 编程(39454) Windows(39381) JSP(37542) MySQL(37267) 数据结构(36424)

博客人气排行榜

    博客电子书下载排行

      >>浏览更多下载

      相关资讯

      相关讨论

      Global site tag (gtag.js) - Google Analytics