12345678910111213141516171819202122232425262728293031323334353637 |
- //
- // LoadingView.m
- // YouHuiProject
- //
- // Created by 小花 on 2018/11/1.
- // Copyright © 2018年 kuxuan. All rights reserved.
- //
- #import "LoadingView.h"
- #import "ActivityIndicatorView.h"
- @implementation LoadingView
- + (void)show {
- ActivityIndicatorView *indicatorView = [ActivityIndicatorView shareIndicatorView];
- [indicatorView startAnimating];
- UIWindow *window = [UIApplication sharedApplication].keyWindow;
- [window addSubview:indicatorView];
- indicatorView.center = window.center;
- }
- + (void)showInView:(UIView *)superView {
- ActivityIndicatorView *indicatorView = [ActivityIndicatorView shareIndicatorView];
- [indicatorView startAnimating];
- [superView addSubview:indicatorView];
- indicatorView.center = superView.center;
- }
- + (void)dismiss {
- ActivityIndicatorView *indicatorView = [ActivityIndicatorView shareIndicatorView];
- [indicatorView removeFromSuperview];
- }
- @end
|