欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  技术分享

FeSpinner IOS自定义网络加载等待动画

程序员文章站 2021-12-28 21:38:51
...

FeSpinner是一个IOS的网络请求动画加载效果Demo、可适用于任何App的集成、代码一共有9个动画效果、可以根据自己的需要*的选择要集成的动画、具体的可以看看下面的GIF图片、图片中只显示了两种动画、另外的7种大家可以直接下载源代码预览

FeSpinner IOS自定义网络加载等待动画


动画1调用代码

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor colorWithHexCode:@"#ffe200"];
    
    _handwritingLoader = [[FeHandwriting alloc] initWithView:self.view];
    [self.view addSubview:_handwritingLoader];
    
    [_handwritingLoader showWhileExecutingBlock:^{
        [self myTask];
    } completion:^{
        [self.navigationController popToRootViewControllerAnimated:YES];
    }];
}


动画2调用代码

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    _hourGlass = [[FeHourGlass alloc] initWithView:self.view];
    [self.view addSubview:_hourGlass];
    
    [_hourGlass showWhileExecutingBlock:^{
        [self myTask];
    } completion:^{
        [self.navigationController popToRootViewControllerAnimated:YES];
    }];
}


ios 自定义加载动画源代码下载链接: ios等待动画 密码: nm36