Skip to content

Commit

Permalink
Merge pull request #510 from xilin/master
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
wangmchn authored Jul 2, 2018
2 parents cb4f48f + 194cdc7 commit 75ab242
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WMPageController/WMMenuView/WMMenuView.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ typedef NS_ENUM(NSUInteger, WMMenuViewLayoutMode) {
@protocol WMMenuViewDelegate <NSObject>
@optional
- (BOOL)menuView:(WMMenuView *)menu shouldSelesctedIndex:(NSInteger)index;
- (void)menuView:(WMMenuView *)menu didSelesctedIndex:(NSInteger)index currentIndex:(NSInteger)currentIndex;
- (void)menuView:(WMMenuView *)menu didSelectedIndex:(NSInteger)index currentIndex:(NSInteger)currentIndex;
- (CGFloat)menuView:(WMMenuView *)menu widthForItemAtIndex:(NSInteger)index;
- (CGFloat)menuView:(WMMenuView *)menu itemMarginAtIndex:(NSInteger)index;
- (CGFloat)menuView:(WMMenuView *)menu titleSizeForState:(WMMenuItemState)state atIndex:(NSInteger)index;
Expand Down
8 changes: 4 additions & 4 deletions WMPageController/WMMenuView/WMMenuView.m
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,8 @@ - (void)selectItemAtIndex:(NSInteger)index {
self.selItem = item;
[self.selItem setSelected:YES withAnimation:NO];
[self.progressView setProgressWithOutAnimate:index];
if ([self.delegate respondsToSelector:@selector(menuView:didSelesctedIndex:currentIndex:)]) {
[self.delegate menuView:self didSelesctedIndex:index currentIndex:currentIndex];
if ([self.delegate respondsToSelector:@selector(menuView:didSelectedIndex:currentIndex:)]) {
[self.delegate menuView:self didSelectedIndex:index currentIndex:currentIndex];
}
[self refreshContenOffset];
}
Expand Down Expand Up @@ -592,8 +592,8 @@ - (void)didPressedMenuItem:(WMMenuItem *)menuItem {
[self.progressView moveToPostion:progress];

NSInteger currentIndex = self.selItem.tag - WMMENUITEM_TAG_OFFSET;
if ([self.delegate respondsToSelector:@selector(menuView:didSelesctedIndex:currentIndex:)]) {
[self.delegate menuView:self didSelesctedIndex:menuItem.tag - WMMENUITEM_TAG_OFFSET currentIndex:currentIndex];
if ([self.delegate respondsToSelector:@selector(menuView:didSelectedIndex:currentIndex:)]) {
[self.delegate menuView:self didSelectedIndex:menuItem.tag - WMMENUITEM_TAG_OFFSET currentIndex:currentIndex];
}

[self.selItem setSelected:NO withAnimation:YES];
Expand Down
2 changes: 1 addition & 1 deletion WMPageController/WMPageController.m
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,7 @@ - (void)scrollViewWillEndDragging:(UIScrollView *)scrollView withVelocity:(CGPoi
}

#pragma mark - WMMenuView Delegate
- (void)menuView:(WMMenuView *)menu didSelesctedIndex:(NSInteger)index currentIndex:(NSInteger)currentIndex {
- (void)menuView:(WMMenuView *)menu didSelectedIndex:(NSInteger)index currentIndex:(NSInteger)currentIndex {
if (!_hasInited) return;
_selectIndex = (int)index;
_startDragging = NO;
Expand Down

0 comments on commit 75ab242

Please sign in to comment.