UIImage

作者: 番茄红豆汤 | 来源:发表于2019-04-23 13:53 被阅读0次
        NSString  *name = @"loading.gif";
        NSString  *filePath = [[NSBundle bundleWithPath:[[NSBundle mainBundle] bundlePath]] pathForResource:name ofType:nil];
        NSData  *imageData = [NSData dataWithContentsOfFile:filePath];
        
        if (!self.loadingImageView) {
            self.loadingImageView = [[UIImageView alloc]init];
        }
        //    imgView.image = [UIImage animatedImageWithAnimatedGIFData:imageData];
        self.loadingImageView.backgroundColor = [UIColor clearColor];
        self.loadingImageView.image = [UIImage sd_animatedGIFWithData:imageData];
        self.loadingImageView.frame = CGRectMake(0, 0, 100, 250/2.0);
        [self.view addSubview:self.loadingImageView];
        [self.view bringSubviewToFront:self.loadingImageView];
    

    相关文章

      网友评论

          本文标题:UIImage

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