ATLoadView
示例
要运行示例项目,先克隆仓库,然后从 Example 目录中执行 pod install
#import <ATLoadView/ATLoadView.h>
- 加载 - 默认
ATLoadView *view = [ATLoadView viewWithText:@"LOADING..."];
[view showIn:self.view];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[view hide];
});
- 加载 - 亮色
ATLoadView *view = [ATLoadView viewWithLightStyle];
[view showIn:self.view];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[view hide];
});
- 加载 - 暗色
ATLoadView *view = [ATLoadView viewWithDarkStyle];
[view showIn:self.view];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[view hide];
});
- 加载 - GIF 图片
ATLoadView *view = [ATLoadView viewWithGifImage:[YYImage imageNamed:@"popup_load_balls.gif"]];
[view showIn:self.view];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[view hide];
});
需求
安装
ATLoadView 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod 'ATLoadView'
作者
ablett, [email protected]
许可证
ATLoadView 在 MIT 许可下可用。更多信息请参阅 LICENSE 文件。