下面这张图你也许在主流的App上都见过吧,加载的时候就是显示这个骨架图
image.png
这个就是TABAnimated实现的。
具体使用请看Git Hub的文档和Demo,很赞的就是最新版本支持Xib生成骨架图了。
简单的使用
在 didFinishLaunchingWithOptions 中初始化 TABAimated
[[TABAnimated sharedAnimated] initWithOnlySkeleton];
[TABAnimated sharedAnimated].openLog = YES;
简单的说下一UITableView的简单使用
self.tableView.tabAnimated = [TABTableAnimated animatedWithCellClass:[TableCell class] cellHeight:180];
self.tableView.tabAnimated.adjustBlock = ^(TABComponentManager * _Nonnull manager) {
manager.animation(3).width(100);
};
[self.tableView tab_startAnimationWithCompletion:^{
[self setupData];
}];
// 停止动画,并刷新数据
[self.tableView tab_endAnimationEaseOut];
以上就是简单使用,复杂的使用请看文档和Demo,这里就不具体讲解了。这个开源很赞了,再也不需要使用菊花了。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有