Skip to content

Commit b68d4b3

Browse files
committed
update README.md file.
1 parent 8c07276 commit b68d4b3

File tree

1 file changed

+35
-7
lines changed

1 file changed

+35
-7
lines changed

README.md

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
![GitHub fork](https://img.shields.io/github/forks/ChinaHackers/LCSlideMenu.svg?style=social&label=Fork)
1313
[![Twitter Follow](https://img.shields.io/twitter/follow/LiuChuan_.svg?style=social)](https://twitter.com/LiuChuan_)
1414

15+
---
1516

1617
## What is LCSlideMenu?
1718

@@ -22,7 +23,34 @@
2223

2324
| ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast01.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast02.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast03.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast04.gif) |
2425
| :------------: | :------------: | :------------: | :------------: |
25-
| `indicatorType = .stretch` `titleStyle = .gradient` | `indicatorType = .normal` `titleStyle = .cover` | `indicatorType = .stretch` `titleStyle = .transfrom` | `indicatorType = .normal` `titleStyle = .transfrom` |
26+
| `indicatorType = .stretch` `titleStyle = .gradient` | `indicatorType = .cover` `titleStyle = .gradient` | `indicatorType = .stretch` `titleStyle = .transfrom` | `indicatorType = .normal` `titleStyle = .transfrom` |
27+
28+
| ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast05.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast06.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast08.gif) | ![](https://github.com/ChinaHackers/LCSlideMenu/raw/master/Screencast/Screencast07.gif) |
29+
| :------------: | :------------: | :------------: | :------------: |
30+
| `indicatorType = .cover` `titleStyle = .gradient` | `isShowIndicatorView = false` `titleStyle = .transfrom` | `indicatorType = .cover` `titleStyle = .transfrom` | `isShowIndicatorView = false` `titleStyle = .gradient` |
31+
32+
---
33+
34+
35+
## Attribute
36+
37+
| Attribute name | Specific introduction of attributes |
38+
| :------------: | :------------: |
39+
| `coverView` | Mask the view |
40+
| `indicatorType ` | LCSlideMenu of indicator type |
41+
| `titleStyle` | Heading styles |
42+
| `itemFont` | The font size of the heading |
43+
| `isShowIndicatorView` | Whether to display the indicator view |
44+
| `isNeedMask` | Do you need a mask? |
45+
| `coverHeight` | The height of the mask view |
46+
| `coverColor` | The background color of the mask view |
47+
| `selectedColor` | The color in the currently selected state |
48+
| `unSelectedColor` | The color of the unchecked state |
49+
| `bottomPadding` | The indicator is at the bottom |
50+
| `indicatorHeight` | Height of indicator |
51+
52+
53+
---
2654

2755
## Requirements
2856

@@ -80,23 +108,23 @@ class ViewController: UIViewController {
80108
fileprivate func example() {
81109

82110
let titles = ["Apple", "Banana", "Watermelon", "Orange", "Lemon", "Pear","Strawberry", "Sapodilla", "Haw", "Grape","Mango", "Plum", "Persimmon", "Fig", "Betelnut"]
83-
84111
var controllers: [UIViewController] = []
85112

86113
for _ in 0 ..< titles.count {
87114
let vc = UIViewController()
88115
vc.view.backgroundColor = UIColor(red: CGFloat(arc4random() % 256) / 255, green: CGFloat(arc4random() % 256) / 255, blue: CGFloat(arc4random() % 256) / 255, alpha: 1)
89-
90116
addChildViewController(vc)
91117
controllers.append(vc)
92118
}
93119
/* -- LCSlideMenu -- */
94120
let slideMenu = LCSlideMenu(frame: CGRect(x: 0, y: 64, width: view.frame.width, height: 40), titles: titles, childControllers: controllers)
95-
slideMenu.indicatorType = .stretch
121+
slideMenu.indicatorType = .cover
96122
slideMenu.titleStyle = .gradient
97-
slideMenu.isShowIndicatorView = true
98-
slideMenu.isNeedMask = false
99-
slideMenu.selectedColor = .red
123+
slideMenu.isShowIndicatorView = false
124+
slideMenu.isNeedMask = true
125+
slideMenu.coverView.layer.cornerRadius = slideMenu.coverHeight * 0.2
126+
slideMenu.coverColor = .black
127+
slideMenu.selectedColor = .white
100128
slideMenu.unSelectedColor = .black
101129
slideMenu.indicatorView.backgroundColor = .red
102130
view.addSubview(slideMenu)

0 commit comments

Comments
 (0)