美文网首页
图片播放动画效果

图片播放动画效果

作者: lifeLL | 来源:发表于2018-10-26 10:51 被阅读0次
     //动画icon
             _iconView = [[UIImageView alloc]init];
             [self.contentView addSubview:_iconView];
    
            [_iconView mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(_imageView).offset(8);
               make.height.mas_equalTo(10);
                 make.width.mas_equalTo(12);
                make.bottom.equalTo(_imageView).offset(-5);
            }];
            NSArray* iconArray = @[@"live_icon_1",@"live_icon_2",@"live_icon_3",@"live_icon_4"];
            NSMutableArray* imageArray = [NSMutableArray array];
            for (NSString* temp in iconArray) {
                UIImage* img =[UIImage imageNamed:temp];
                [imageArray addObject:img];
            }
            _iconView.animationImages = imageArray;
            _iconView.animationRepeatCount = 0;
            _iconView.animationDuration = 1;
            [_iconView startAnimating];
    
    11540522171_.pic.jpg

    相关文章

      网友评论

          本文标题:图片播放动画效果

          本文链接:https://www.haomeiwen.com/subject/bgrktqtx.html