@@ -50,17 +50,21 @@ self.addSubview(view)
5050```
5151done!
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
6366self .hideMenu ()
67+ }
6468```
6569
6670### Customize
@@ -79,6 +83,11 @@ view.disabledMenuAt(index: 2)
7983view.enabledMenuAt (index : 3 )
8084```
8185
86+ Always selected button label
87+ ``` swift
88+ view.alwaysSelectedAt (index : 0 )
89+ ```
90+
8291Button Image with 3 situations (normal, selected, disabled)
8392``` swift
8493view.setImageWhen (normal : UIImage (named : " arrow_nor" ), selected : UIImage (named : " arrow_sel" ), disabled : UIImage (named : " arrow_dim" ))
@@ -126,9 +135,16 @@ view.hideMenuSpringVelocity = 0.9
126135view.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