文章来源:淘论文网   发布者: 毕业设计   浏览量: 27



还可以点击去查询以下关键词:
[Skeleton]    [风格]    [加载]    [毕业]    [耦合]    [调用]    [UIView]    [扩展]    [方法]    [即可]    [Skeleton风格的加载库。低毕业耦合。调用UIView扩展方法即可]   

项目介绍:

介绍

iOS数据加载时的UI,在前几年,论文,UI效果太过于局限。直到Skeleton出现,
这种效果是预先加载布局,会员不是面对一片空白,或者面对一个简单的旋转效果。
Somo对UIView进行了扩展,开发者只需要调用一个方法即可开始或者结束Skeleton效果。

用法

① 集成:pod 'Somo'

② 当需要某一个UIView拥有Skeleton效果时,只需遵守<SomoSkeletonLayoutProtocol>协议

/** * SomoSkeletonLayoutProtocol * * When you need a view that has a Skeleton effect * set the view to follow the protocol **/ @protocol SomoSkeletonLayoutProtocol<NSObject>

③ <SomoSkeletonLayoutProtocol>你必须实现一个@required方法

@required /** * Example: SomoView * s0 = [[SomoView alloc] initWithFrame:CGRectMake(10, 20, 70, 70)]; SomoView * s1 = [[SomoView alloc] initWithFrame:CGRectMake(100, 30, 200, 15)]; SomoView * s2 = [[SomoView alloc] initWithFrame:CGRectMake(100, 70, 100, 15)]; return @[s0,s1,s2]; * * @return array of SomoViews */ - (NSArray<SomoView *> *)somoSkeletonLayout;

④调用UIView的SomoSkeleton扩展方法

/** * When this method is called, the view will have a Skeleton effect, * and the view's subview will be completely obscured. */ - (void)beginSomo; /** * When this method is called and the view is restored to the state you set, * the Skeleton effect disappears. */ - (void)endSomo;

开题报告

这里还有:


还可以点击去查询:
[Skeleton]    [风格]    [加载]    [毕业]    [耦合]    [调用]    [UIView]    [扩展]    [方法]    [即可]    [Skeleton风格的加载库。低毕业耦合。调用UIView扩展方法即可]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/3682.docx
  • 上一篇:微信小程序 绘制二维码 添加中间头像Logo
  • 下一篇:网络视频直播类--原生socket音视频实时传输--智能家居