JVFlowerMenu

open class JVFlowerMenu: Pedal

The class that represents the JVFlowerMenu

  • The Pedal’s that have been added to the menu

    Declaration

    Swift

    open var pedals: [Pedal] = [Pedal]()
  • The distance the Pedal’s will fly away from the JVFlowerMenu. The default is 100

    Declaration

    Swift

    open var pedalDistance: CGFloat = 100
  • The space between each Pedal once expanded. The Default is 50

    Declaration

    Swift

    open var pedalSpace: CGFloat = 50
  • Angle from the center of the JVFlowerMenu that the first Pedal’s center will be upon completion of expansion. Default it 0 (Directly above the JVFlowerMenu)

    Declaration

    Swift

    open var startAngle: CGFloat = 0
  • The amound of time the JVFlowerMenu will take to grow its Pedal’s when expanded. Default is 0.4 seconds

    Declaration

    Swift

    open var growthDuration: TimeInterval = 0.4
  • amount of time between Pedal growth during JVFlowerMenu expansion. Default is 0.6 seconds.

    Declaration

    Swift

    open var stagger: TimeInterval = 0.06
  • Boolean that lets you check the state of the JVFlowerMenu

    Declaration

    Swift

    open var menuIsExpanded: Bool = false
  • The delegate for the JVFlowerMenu where events will be broadcast.

    Declaration

    Swift

    open var delegate: JVFlowerMenuDelegate?
  • The designated initalizer for the JVFlowerMenu

    • Parameters:
      • I: The image that will represent the JVFlowerMenu to the user. If nil is passed then a basic hamburger menu is drawn.
      • title: The title of the JVFlowerMenu to communicate functionality to users. If nil is passed then nothing is displayed.

    Declaration

    Swift

    public override init(withImage I: UIImage?, andTitle title: String?)

    Parameters

    I

    The image that will represent the JVFlowerMenu to the user. If nil is passed then a basic hamburger menu is drawn.

    title

    The title of the JVFlowerMenu to communicate functionality to users. If nil is passed then nothing is displayed.

  • The method that can be used to add a Pedal to the JVFlowerMenu. Make sure the JVFlowerMenu has a superview or the view will be absolutly and positivly destroyed by garbage collection and you will be wondering what the hell happened!!!

    • Parameters:
      • image: The image for the new Pedal. Defaults to a basic UIColor.blue circle if nil is passed.
      • title: The title for the new Pedal. Defaults to nothing if nil is passed

    Declaration

    Swift

    public func addPedal(withImage image: UIImage?, withTitle title: String?)

    Parameters

    image

    The image for the new Pedal. Defaults to a basic UIColor.blue circle if nil is passed.

    title

    The title for the new Pedal. Defaults to nothing if nil is passed

  • Alternate function to add a Pedal that you have already initalized

    Parameter

    Parameter pedal: The Pedal you want added to the JVFlowerMenu

    Declaration

    Swift

    public func add(_ pedal: Pedal)

    Parameters

    pedal

    The Pedal you want added to the JVFlowerMenu

  • Make the JVFlowerMenu grow its pedals.

    Declaration

    Swift

    public func grow()
  • Make the JVFlowerMenu shrivel its pedals.

    Declaration

    Swift

    public func shrivel()