首页 > 其他 > 详细

UIImageView

时间:2016-01-19 12:25:38      阅读:279      评论:0      收藏:0      [点我收藏+]

1.contentMode

view.contentMode = UIViewContentModeScaleAspectFill;

技术分享

2.是否实现触摸

    技术分享

3.简单实现动画 图片的名字为campFire01-campFire17

    NSMutableArray * imagearray = [NSMutableArray array];

    for (int i = 1; i<=17; i++) {

        //拼接图片的名字

        NSString *name = [NSString stringWithFormat:@"campFire%@%d",i<10?@"0":@"",i];

        //NSString *name = [NSString stringWithFormat:@"campFire%02d",i];

        UIImage * image = [UIImage imageNamed:name];

        [imagearray addObject:image];

    }

    UIImageView * view = [[UIImageView alloc]initWithFrame:CGRectMake(40, 40, 320-80, 568-80)];

    view.contentMode = UIViewContentModeScaleAspectFit;

    view.animationImages = imagearray;//直接接受数组

    view.animationDuration = 2;//时间

    view.animationRepeatCount = 0;//重复多少次 0表示无数次

    [view startAnimating];

UIImageView

原文:http://www.cnblogs.com/huoran1120/p/5141366.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!