Skip to content

Commit

Permalink
Update AwesomeMenu.m
Browse files Browse the repository at this point in the history
应该在expended为false时,调用awesomeMenuWillAnimateClose方法
  • Loading branch information
iamdaiyuan committed Jul 2, 2015
1 parent bdb637c commit 9a6964d
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions AwesomeMenu/AwesomeMenu/AwesomeMenu.m
Original file line number Diff line number Diff line change
Expand Up @@ -275,16 +275,19 @@ - (BOOL)isExpanded
}
- (void)setExpanded:(BOOL)expanded
{
if (expanded) {
[self _setMenu];
_expanded = expanded;

if (expanded) {
[self _setMenu];
if(self.delegate && [self.delegate respondsToSelector:@selector(awesomeMenuWillAnimateOpen:)]){
[self.delegate awesomeMenuWillAnimateOpen:self];
}
}
}

_expanded = expanded;
if(self.delegate && [self.delegate respondsToSelector:@selector(awesomeMenuWillAnimateClose:)]){
[self.delegate awesomeMenuWillAnimateClose:self];
if (!expanded) {
if(self.delegate && [self.delegate respondsToSelector:@selector(awesomeMenuWillAnimateClose:)]){
[self.delegate awesomeMenuWillAnimateClose:self];
}
}

// rotate add button
Expand Down

0 comments on commit 9a6964d

Please sign in to comment.