|
2 | 2 | * [集成](#somo_integrate)
|
3 | 3 | * [用法](#somo_usage)
|
4 | 4 | * [UITableView-skeleton](#somo_uitableview)
|
5 |
| -### <a id="somo_intro"></a>简介 |
6 |
| - |
7 |
| -### <a id="somo_integrate"></a>集成 |
8 |
| -```pod 'Somo'``` |
9 |
| -### <a id="somo_usage"></a>使用 |
| 5 | +#### <a id="somo_intro"></a>简介 |
| 6 | + |
| 7 | +- [x] iOS 7.0+ |
| 8 | +- [x] 多样式 |
| 9 | +- [x] 轻量级,核心实现仅仅是对UIView进行扩展 |
| 10 | +- [x] 可以自定义 |
| 11 | + |
| 12 | +#### 🍎 SomoAnimationStyle |
| 13 | + |
| 14 | + ```objective-c |
| 15 | + typedef NS_ENUM(NSInteger,SomoAnimationStyle) { |
| 16 | + SomoAnimationStyleSolid, |
| 17 | + SomoAnimationStyleGradientHorizontal, |
| 18 | + SomoAnimationStyleGradientVertical, |
| 19 | + SomoAnimationStyleOblique |
| 20 | +}; |
| 21 | + ``` |
| 22 | +
|
| 23 | +<table> |
| 24 | +<tr> |
| 25 | +<td width="25%"> |
| 26 | +<center>Solid</center> |
| 27 | +</td> |
| 28 | +<td width="25%"> |
| 29 | +<center>GradientHorizontal</center> |
| 30 | +</td> |
| 31 | +<td width="25%"> |
| 32 | +<center>GradientVertical</center> |
| 33 | +</td> |
| 34 | +<td width="25%"> |
| 35 | +<center>Oblique</center> |
| 36 | +</td> |
| 37 | +</tr> |
| 38 | +<tr> |
| 39 | +<td width="25%"> |
| 40 | +<img src="https://github.com/xorshine/Somo/blob/master/solid.gif"></img> |
| 41 | +</td> |
| 42 | +<td width="25%"> |
| 43 | +<img src="https://github.com/xorshine/Somo/blob/master/horizontal.gif"></img> |
| 44 | +</td> |
| 45 | +<td width="25%"> |
| 46 | +<img src="https://github.com/xorshine/Somo/blob/master/vertical.gif"></img> |
| 47 | +</td> |
| 48 | +<td width="25%"> |
| 49 | +<img src="https://github.com/xorshine/Somo/blob/master/oblique.gif"></img> |
| 50 | +</td> |
| 51 | +</tr> |
| 52 | +</table> |
| 53 | + |
| 54 | +#### <a id="somo_integrate"></a>集成 |
| 55 | +```pod 'Somo'`` |
| 56 | +` |
| 57 | +#### <a id="somo_usage"></a>使用 |
10 | 58 | ```objective-c
|
11 | 59 | #import "Somo.h"
|
12 | 60 | ```
|
|
31 | 79 | - (void)beginSomo;
|
32 | 80 | - (void)endSomo;
|
33 | 81 | ```
|
34 |
| -### <a id="somo_uitableview"></a>UITableView-skeleton |
35 |
| -在常见场景中,数据请求未着陆前,UITableView中所有visibleCells都应该呈现skeleton效果。为了达到这种效果,您不必再编写更多的代码。Somo中有一个遵循<UITableViewDataSource,UITableViewDelegate>协议的SomoDataSourceProvider类,您只需要按照该类指定的初始化方法构造一个实例,数据未着陆前,将tableview实例的datasource和delegate指向构造出的SomoDataSourceProvider实例。当数据着陆后,将tableview的datasource和delegate指向controller或其他。 |
| 82 | +#### <a id="somo_uitableview"></a>UITableView-skeleton |
| 83 | +在常见场景中,数据请求未着陆前,UITableView中所有visibleCells都应该呈现skeleton效果。为了达到这种效果, |
| 84 | + |
| 85 | +您不必再编写更多的代码。Somo中有一个遵循<UITableViewDataSource,UITableViewDelegate>协议的SomoDataSourceProvider类, |
| 86 | + |
| 87 | +您只需要按照该类指定的初始化方法构造一个实例,数据未着陆前,将tableview实例的datasource和delegate指向构造出 |
| 88 | + |
| 89 | +的SomoDataSourceProvider实例。当数据着陆后,将tableview的datasource和delegate指向controller或其他。 |
| 90 | + |
36 | 91 | * 数据着陆前:
|
37 | 92 | ```objective-c
|
38 | 93 | #pragma mark - provider
|
|
0 commit comments