ios中的加载动画的实现

  _gifimageView = [[UIImageView alloc]init];

    NSString *path =[[NSBundle mainBundle]pathForResource:@"f2f2f2" ofType:@"gif"];

    NSData *data = [NSData dataWithContentsOfFile:path];

    UIImage*image = [UIImagesd_animatedGIFWithData:data];

    _gifimageView.image= image;

    [self.view addSubview:_gifimageView];

    [_gifimageView mas_makeConstraints:^(MASConstraintMaker *make) {

        make.centerX.mas_equalTo(self.view.mas_centerX);

        make.top.mas_equalTo(100);

        make.size.mas_equalTo(CGSizeMake(71,71));

    }];

你可能感兴趣的:(ios中的加载动画的实现)