Skip to content

Commit c358b79

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents d7a0603 + fd4e6bb commit c358b79

File tree

6 files changed

+62
-7
lines changed

6 files changed

+62
-7
lines changed

README.md

+62-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,59 @@
22
* [集成](#somo_integrate)
33
* [用法](#somo_usage)
44
* [UITableView-skeleton](#somo_uitableview)
5-
### <a id="somo_intro"></a>简介
6-
![](https://github.com/xorshine/Somo/blob/master/Somo.gif)
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>使用
1058
```objective-c
1159
#import "Somo.h"
1260
```
@@ -31,8 +79,15 @@
3179
- (void)beginSomo;
3280
- (void)endSomo;
3381
```
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+
3691
* 数据着陆前:
3792
```objective-c
3893
#pragma mark - provider

Somo.gif

-2.16 MB
Binary file not shown.

horizontal.gif

23.4 KB
Loading

oblique.gif

36.7 KB
Loading

solid.gif

33.6 KB
Loading

vertical.gif

201 KB
Loading

0 commit comments

Comments
 (0)