YNDropDownMenu
open class YNDropDownMenu: UIView, YNDropDownDelegate
Main Class for YNDropDownMenu
-
Blur effect view will changed if you change this popperty. Backgorund view don’t have to be blur view (e.g. UIColor.black)
Declaration
Swift
open var blurEffectView: UIView? -
Alpha Value if animation ended in hideMenu() function
Declaration
Swift
open var blurEffectViewAlpha:CGFloat = 1.0 -
Blur effect style in background view
Declaration
Swift
open var blurEffectStyle:UIBlurEffectStyle = .dark -
Make background blur view enabled
Declaration
Swift
open var backgroundBlurEnabled = true -
Show menu second default value: 0.5
Declaration
Swift
open var showMenuDuration = 0.5 -
Hide menu second default value: 0.3
Declaration
Swift
open var hideMenuDuration = 0.3 -
Show menu spring velocity default value: 0.5
Declaration
Swift
open var showMenuSpringVelocity:CGFloat = 0.5 -
Show menu spring damping default value: 0.8
Declaration
Swift
open var showMenuSpringWithDamping:CGFloat = 0.8 -
Hide menu spring velocity Default value: 0.9
Declaration
Swift
open var hideMenuSpringVelocity:CGFloat = 0.9 -
Hide menu spring damping Default value: 0.8
Declaration
Swift
open var hideMenuSpringWithDamping:CGFloat = 0.8 -
Bottom 0.5px line
Declaration
Swift
open var bottomLine: UIView! -
Init YNDropDownMenu with frame, views, strings. Views count and titles count should be same
Declaration
Swift
public init(frame: CGRect, dropDownViews: [UIView], dropDownViewTitles: [String])Parameters
frameCGRect Frame
dropDownViewsUse [UIView] or [YNDropDownView]
dropDownViewTitles[String]
-
deprecated use init(frame: CGRect, dropDownViews: [UIView], dropDownViewTitles: [String]) instead
Declaration
Swift
public init(frame: CGRect, YNDropDownViews: [YNDropDownView], dropDownViewTitles: [String]) -
Init coder
Declaration
Swift
required public init?(coder aDecoder: NSCoder) -
Set arrow image or other images. Same image size is the best
Declaration
Swift
open func setImageWhen(normal: UIImage?, selected: UIImage?, disabled: UIImage?)Parameters
normalNormal image
selectedSelected image
disabledDisabled image
-
Set an image for a drop-down button with various colors.
Declaration
Swift
open func setImageWhen(normal: UIImage?, selectedTintColor: UIColor, disabledTintColor: UIColor)Parameters
normalNormal image used as a drop-down button.
selectedColorTint color masking the image when the button selected.
disabledColorTint color masking the image when the button disabled.
-
Set an image for a drop-down button with various colors.
Declaration
Swift
open func setImageWhen(normal: UIImage?, selectedTintColorRGB: String, disabledTintColorRGB: String)Parameters
normalNormal image used as a drop-down button.
selectedColorRGBa Hex code color masking the image when the button selected.
disabledColorRGBa Hex code color masking the image when the button disabled.
-
Set backgroung color.
Declaration
Swift
open func setBackgroundColor(color: UIColor)Parameters
colorbackground color.
-
Set label color.
Declaration
Swift
open func setLabelColorWhen(normal: UIColor, selected: UIColor, disabled: UIColor)Parameters
normalNormal color
selectedSelected color
disabledDisabled color
-
Set label color with hex color codes
Declaration
Swift
open func setLabelColorWhen(normalRGB: String, selectedRGB: String, disabledRGB: String)Parameters
normalNormal color
selectedSelected color
disabledDisabled color
-
Set the same label font for every status.
Declaration
Swift
open func setLabel(font: UIFont)Parameters
fontNormal/Selected/Disabled font
-
Set label font.
Declaration
Swift
open func setLabelFontWhen(normal: UIFont, selected: UIFont, disabled: UIFont)Parameters
normalNormal font
selectedSelected font
disabledDisabled font
-
Make button label always selected. (not button image)
Declaration
Swift
open func alwaysSelected(at index: Int)Parameters
indexIndex should be smaller than your menu counts
-
Make button label normal that selected before. (not button image)
Declaration
Swift
open func normalSelected(at index: Int)Parameters
indexIndex should be smaller than your menu counts
-
Make button disabled (title and image you set)
Declaration
Swift
open func disabledMenu(at index: Int)Parameters
indexIndex should be smaller than your menu counts
-
Makes button enabled (title and image you set)
Declaration
Swift
open func enabledMenu(at index: Int)Parameters
indexIndex should be smaller than your menu counts
-
Hide menu will be called when view is opened already.
Declaration
Swift
open func hideMenu() -
Change menu title you called. you can call it in YNDropDownMenu or YNDropDownView
Declaration
Swift
open func changeMenu(title: String, at index: Int)Parameters
titleMenu title
indexIndex should be smaller than your menu counts
-
Change menu title you called. you can call it in YNDropDownMenu or YNDropDownView
Declaration
Swift
open func changeMenu(title: String, status: YNStatus, at index: Int)Parameters
titleMenu title
indexIndex should be smaller than your menu counts
-
Change view you called. you can call it in YNDropDownMenu or YNDropDownView
Declaration
Swift
open func changeView(view: UIView, at index: Int)Parameters
viewview that you want to change
indexIndex should be smaller than your menu counts
-
View will be closed and open when already opened. If not, just open drop down view
Declaration
Swift
open func showAndHideMenu(at index: Int)Parameters
indexIndex should be smaller than your menu counts
-
Deprecated use alwaysSelected(at index: Int) instead
Declaration
Swift
open func alwaysSelectedAt(index: Int) -
Deprecated use disabledMenu(at index: Int) instead
Declaration
Swift
open func disabledMenuAt(index: Int) -
Deprecated use enabledMenu(at index: Int) instead
Declaration
Swift
open func enabledMenuAt(index: Int) -
Deprecated use showAndHideMenu(at index: Int) instead
Declaration
Swift
open func showAndHideMenuAt(index: Int)
YNDropDownMenu Class Reference