Inherits from UIView
Conforms to ALRadialButtonDelegate
Declared in ALRadialMenu.h

Overview

ALRadial is meant to replicate the radial menu’s found in the path ios app. a central button is used to display many others eminating out in a circle.

to use it in your project just add the ALRadialMenu and ALRadialButton files to your project, include ALRadialMenu.h, and implement the 5 ALRadialMenuDelegate methods.

Tasks

Tasks

Properites

  •   delegate

    data source delegate

    property
  •   itemIndex

    property to store the next item to be animated into/out of view

    property
  •   animationTimer

    timer to stagger the animations for displaying and removing items

    property
  •   items

    array storing the buttons to be displayed

    property

Private Methods

Properties

animationTimer

timer to stagger the animations for displaying and removing items

@property (nonatomic, strong) NSTimer *animationTimer

Declared In

ALRadialMenu.h

delegate

data source delegate

@property (nonatomic, weak) id<ALRadialMenuDelegate> delegate

Declared In

ALRadialMenu.h

itemIndex

property to store the next item to be animated into/out of view

@property (nonatomic) NSInteger itemIndex

Declared In

ALRadialMenu.h

items

array storing the buttons to be displayed

@property (nonatomic, strong) NSMutableArray *items

Declared In

ALRadialMenu.h

Instance Methods

buttonPressed:

this method is called by the button when its pressed

- (void)buttonPressed:(id)sender

Parameters

sender

the button that was pressed

Declared In

ALRadialMenu.h

buttonsWillAnimateFromButton:withFrame:inView:

helper method to display or hide the buttons

- (void)buttonsWillAnimateFromButton:(id)sender withFrame:(CGRect)frame inView:(UIView *)view

Parameters

sender

the button that was pressed to initial the action, the child buttons appear behind this object and animate out

frame

the frame to for the calculations

view

the UIView the buttons will appear in

Declared In

ALRadialMenu.h

itemsWillAppearFromButton:withFrame:inView:

method that flings the item’s into view

- (void)itemsWillAppearFromButton:(UIButton *)button withFrame:(CGRect)frame inView:(UIView *)view

Parameters

button

the UIButton the items should appear from

frame

the frame to for the calculations

view

the view the buttons will be added to

Declared In

ALRadialMenu.h

itemsWillDisapearIntoButton:

method that removes the item’s from view

- (void)itemsWillDisapearIntoButton:(UIButton *)button

Parameters

button

the UIButton the items should recoil into

Declared In

ALRadialMenu.h

shouldRotateButton:forDuration:forwardDirection:

rotate a button in place for a given duration

- (void)shouldRotateButton:(UIButton *)button forDuration:(float)duration forwardDirection:(BOOL)direction

Parameters

button

the button that will be rotated

duration

how long the button will rotate for

direction

whether to rotate forward or backward

Declared In

ALRadialMenu.h

willFlingItem

this method is called from the nstimer to fling the next item into view

- (void)willFlingItem

Declared In

ALRadialMenu.h

willRecoilItem

this method is called from the nstimer to recoil the next item from view

- (void)willRecoilItem

Declared In

ALRadialMenu.h