//
//  SVProgressHUD+showAnimation.m
//  socialSecurity
//
//  Created by 看看智能 on 2017/8/31.
//  Copyright © 2017年 黄江涛 . All rights reserved.
//

#import "SVProgressHUD+showAnimation.h"
#import "SVProgressHUD+Extension.h"
#import "UIImage+GIFF.h"


@implementation SVProgressHUD (showAnimation)
+(void)shows{
    
    // 设置显示最小时间 以便观察效果
    UIImageView *svImgView = [[SVProgressHUD sharedView] valueForKey:@"imageView"];
    CGRect imgFrame = svImgView.frame; // 设置图片的显示大小
     imgFrame.size = CGSizeMake(120, 110);
    svImgView.frame = imgFrame;
        [SVProgressHUD setMinimumDismissTimeInterval:MAXFLOAT];

    // 设置背景颜色为透明色
    [SVProgressHUD setBackgroundColor:[UIColor whiteColor]];
    [SVProgressHUD showImage:[UIImage imageWithGIFNamed:@"loading(1)"] status:nil];
    
    
}

+(void)doneShow{
    UIImageView *svImgView = [[SVProgressHUD sharedView] valueForKey:@"imageView"];
    CGRect imgFrame = svImgView.frame; // 设置图片的显示大小
    imgFrame.size = CGSizeMake(0, 0);
    svImgView.frame = imgFrame;
    [SVProgressHUD setMinimumDismissTimeInterval:2.0];
    // 设置背景颜色为透明色
   // [SVProgressHUD setBackgroundColor:[UIColor grayColor]];
    [SVProgressHUD show ];
}

@end
