JVFlowerMenu
open class JVFlowerMenu: Pedal
The class that represents the JVFlowerMenu
-
The distance the
Pedal
’s will fly away from theJVFlowerMenu
. The default is 100Declaration
Swift
open var pedalDistance: CGFloat = 100
-
The space between each
Pedal
once expanded. The Default is 50Declaration
Swift
open var pedalSpace: CGFloat = 50
-
Angle from the center of the
JVFlowerMenu
that the firstPedal
’s center will be upon completion of expansion. Default it 0 (Directly above theJVFlowerMenu
)Declaration
Swift
open var startAngle: CGFloat = 0
-
The amound of time the
JVFlowerMenu
will take to grow itsPedal
’s when expanded. Default is 0.4 secondsDeclaration
Swift
open var growthDuration: TimeInterval = 0.4
-
amount of time between
Pedal
growth duringJVFlowerMenu
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.
- I: The image that will represent the
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. - Parameters:
-
The method that can be used to add a
Pedal
to theJVFlowerMenu
. Make sure theJVFlowerMenu
has a superview or the view will be absolutly and positivly destroyed by garbage collection and you will be wondering what the hell happened!!!Declaration
Swift
public func addPedal(withImage image: UIImage?, withTitle title: String?)
Parameters
image
The image for the new
Pedal
. Defaults to a basicUIColor.blue
circle if nil is passed.title
The title for the new
Pedal
. Defaults to nothing if nil is passed -
Make the
JVFlowerMenu
grow its pedals.Declaration
Swift
public func grow()
-
Make the
JVFlowerMenu
shrivel its pedals.Declaration
Swift
public func shrivel()