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

    frame

    CGRect Frame

    dropDownViews

    Use [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

    normal

    Normal image

    selected

    Selected image

    disabled

    Disabled image

  • Set an image for a drop-down button with various colors.

    Declaration

    Swift

    open func setImageWhen(normal: UIImage?, selectedTintColor: UIColor, disabledTintColor: UIColor)

    Parameters

    normal

    Normal image used as a drop-down button.

    selectedColor

    Tint color masking the image when the button selected.

    disabledColor

    Tint 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

    normal

    Normal image used as a drop-down button.

    selectedColorRGB

    a Hex code color masking the image when the button selected.

    disabledColorRGB

    a Hex code color masking the image when the button disabled.

  • Set backgroung color.

    Declaration

    Swift

    open func setBackgroundColor(color: UIColor)

    Parameters

    color

    background color.

  • Set label color.

    Declaration

    Swift

    open func setLabelColorWhen(normal: UIColor, selected: UIColor, disabled: UIColor)

    Parameters

    normal

    Normal color

    selected

    Selected color

    disabled

    Disabled color

  • Set label color with hex color codes

    Declaration

    Swift

    open func setLabelColorWhen(normalRGB: String, selectedRGB: String, disabledRGB: String)

    Parameters

    normal

    Normal color

    selected

    Selected color

    disabled

    Disabled color

  • Set the same label font for every status.

    Declaration

    Swift

    open func setLabel(font: UIFont)

    Parameters

    font

    Normal/Selected/Disabled font

  • Set label font.

    Declaration

    Swift

    open func setLabelFontWhen(normal: UIFont, selected: UIFont, disabled: UIFont)

    Parameters

    normal

    Normal font

    selected

    Selected font

    disabled

    Disabled font

  • Make button label always selected. (not button image)

    Declaration

    Swift

    open func alwaysSelected(at index: Int)

    Parameters

    index

    Index 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

    index

    Index should be smaller than your menu counts

  • Make button disabled (title and image you set)

    Declaration

    Swift

    open func disabledMenu(at index: Int)

    Parameters

    index

    Index should be smaller than your menu counts

  • Makes button enabled (title and image you set)

    Declaration

    Swift

    open func enabledMenu(at index: Int)

    Parameters

    index

    Index 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

    title

    Menu title

    index

    Index 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

    title

    Menu title

    index

    Index 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

    view

    view that you want to change

    index

    Index 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

    index

    Index 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)