Skip to content

Commit c03936d

Browse files
authored
Update README.md
1 parent ce126c9 commit c03936d

File tree

1 file changed

+25
-9
lines changed

1 file changed

+25
-9
lines changed

README.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ self.addSubview(view)
5050
```
5151
done!
5252

53-
### Call hide menu in drop down views
54-
Init view with frame`[CGRect]`, YNDropDownViews`[YNDropDownView]` and Titles`[String]`
53+
### Inherit YNDropDownView
5554
```swift
56-
let view = YNDropDownMenu(frame:frame, YNDropDownViews: yNDropDownViews, dropDownViewTitles: ["Apple", "Banana", "Kiwi", "Pear"])
57-
self.addSubview(view)
58-
```
59-
60-
Custom YNDropDownView
61-
```swift
62-
class DropDownView: YNDropDownView
55+
class DropDownView: YNDropDownView {
56+
// override method to call open & close
57+
override func dropDownViewOpened() {
58+
print("dropDownViewOpened")
59+
}
60+
61+
override func dropDownViewClosed() {
62+
print("dropDownViewClosed")
63+
}
64+
65+
// Hide Menu
6366
self.hideMenu()
67+
}
6468
```
6569

6670
### Customize
@@ -79,6 +83,11 @@ view.disabledMenuAt(index: 2)
7983
view.enabledMenuAt(index: 3)
8084
```
8185

86+
Always selected button label
87+
```swift
88+
view.alwaysSelectedAt(index: 0)
89+
```
90+
8291
Button Image with 3 situations (normal, selected, disabled)
8392
```swift
8493
view.setImageWhen(normal: UIImage(named: "arrow_nor"), selected: UIImage(named: "arrow_sel"), disabled: UIImage(named: "arrow_dim"))
@@ -126,9 +135,16 @@ view.hideMenuSpringVelocity = 0.9
126135
view.hideMenuSpringWithDamping = 0.8
127136
```
128137

138+
### Deprecated
139+
```swift
140+
let view = YNDropDownMenu(frame:frame, YNDropDownViews: yNDropDownViews, dropDownViewTitles: ["Apple", "Banana", "Kiwi", "Pear"])
141+
```
142+
129143
## Author
130144
[Younatics](http://younatics.github.io)
131145

146+
## Thanks to
147+
[@jegumhon](https://github.com/jegumhon)
132148

133149
## License
134150

0 commit comments

Comments
 (0)