美文网首页
关于图片gif效果的制作

关于图片gif效果的制作

作者: Youthfulless | 来源:发表于2016-11-30 10:29 被阅读8次

    ///声音按钮

    voiceBtn = [[UIButtonalloc] initWithFrame:CGRectMake(kScreenWidth/2+10, kScreenWidths*2 + 5, kScreenWidths, kScreenWidths)];

    [voiceBtnsetImage:[UIImageimageNamed:@"icon_listen"] forState:UIControlStateNormal];

    [voiceBtnsetImage:[UIImageimageNamed:@"icon_listen_ov"] forState:UIControlStateHighlighted];

    [voiceBtnaddTarget:selfaction:@selector(voiceBtnClick) forControlEvents:(UIControlEventTouchUpInside)];

    /// 初始化一个可变数组

    NSMutableArray *Array = [[NSMutableArrayalloc]init];

    for (NSUInteger i =1; i < 4; i++) {

    UIImage *imageName = [UIImage  imageNamed:[NSStringstringWithFormat:@"listen_%zd.png",i]];

    NSLog(@"%@",imageName);

    [Array addObject:imageName];

    }

    voiceBtn.imageView.animationImages = Array;

    voiceBtn.imageView.animationDuration = 2.0;

    [bouncedView addSubview:voiceBtn];

    相关文章

      网友评论

          本文标题:关于图片gif效果的制作

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