Skip to content

Commit

Permalink
Change expand method to open
Browse files Browse the repository at this point in the history
  • Loading branch information
lvyzhu committed Feb 26, 2015
1 parent b6597d9 commit bdb637c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Binary file not shown.
2 changes: 1 addition & 1 deletion AwesomeMenu/AwesomeMenu/AwesomeMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

- (AwesomeMenuItem *)menuItemAtIndex:(NSUInteger)index;

- (void)expand;
- (void)open;

- (void)close;

Expand Down
12 changes: 6 additions & 6 deletions AwesomeMenu/AwesomeMenu/AwesomeMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ static CGPoint RotateCGPointAroundCenter(CGPoint point, CGPoint center, float an
}

@interface AwesomeMenu ()
- (void)_expand;
- (void)_close;
- (void)_expandAnimation;
- (void)_closeAnimation;
- (void)_setMenu;
- (CAAnimationGroup *)_blowupAnimationAtPoint:(CGPoint)p;
- (CAAnimationGroup *)_shrinkAnimationAtPoint:(CGPoint)p;
Expand Down Expand Up @@ -229,7 +229,7 @@ - (AwesomeMenuItem *)menuItemAtIndex:(NSUInteger)index
return self.menuItems[index];
}

- (void)expand
- (void)open
{
if (_isAnimating || [self isExpanded]) {
return;
Expand Down Expand Up @@ -299,7 +299,7 @@ - (void)setExpanded:(BOOL)expanded
if (!_timer)
{
_flag = [self isExpanded] ? 0 : ([self.menuItems count] - 1);
SEL selector = [self isExpanded] ? @selector(_expand) : @selector(_close);
SEL selector = [self isExpanded] ? @selector(_expandAnimation) : @selector(_closeAnimation);

// Adding timer to runloop to make sure UI event won't block the timer from firing
_timer = [NSTimer timerWithTimeInterval:timeOffset target:self selector:selector userInfo:nil repeats:YES];
Expand All @@ -310,7 +310,7 @@ - (void)setExpanded:(BOOL)expanded

#pragma mark - Private methods

- (void)_expand
- (void)_expandAnimation
{

if (_flag == [self.menuItems count])
Expand Down Expand Up @@ -358,7 +358,7 @@ - (void)_expand

}

- (void)_close
- (void)_closeAnimation
{
if (_flag == -1)
{
Expand Down

0 comments on commit bdb637c

Please sign in to comment.