diff --git a/WMPageController/WMMenuView/WMMenuView.m b/WMPageController/WMMenuView/WMMenuView.m index ac5bc3e..bbd6656 100755 --- a/WMPageController/WMMenuView/WMMenuView.m +++ b/WMPageController/WMMenuView/WMMenuView.m @@ -580,7 +580,9 @@ - (void)addProgressViewWithFrame:(CGRect)frame isTriangle:(BOOL)isTriangle hasBo #pragma mark - Menu item delegate - (void)didPressedMenuItem:(WMMenuItem *)menuItem { - + if (self.selItem == menuItem) { + return; + } if ([self.delegate respondsToSelector:@selector(menuView:shouldSelesctedIndex:)]) { BOOL should = [self.delegate menuView:self shouldSelesctedIndex:menuItem.tag - WMMENUITEM_TAG_OFFSET]; if (!should) { diff --git a/WMPageControllerDemo/StickyExample/StickyExample/WMStickyPageController/WMMagicScrollView.m b/WMPageControllerDemo/StickyExample/StickyExample/WMStickyPageController/WMMagicScrollView.m index 17a733c..3660724 100755 --- a/WMPageControllerDemo/StickyExample/StickyExample/WMStickyPageController/WMMagicScrollView.m +++ b/WMPageControllerDemo/StickyExample/StickyExample/WMStickyPageController/WMMagicScrollView.m @@ -171,7 +171,10 @@ - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(N if (diff == 0.0 || !_isObserving) return; + static CGFloat onePixel = 1/[UIScreen mainScreen].scale; CGFloat maximumContentOffsetY = _maximumHeaderViewHeight - _minimumHeaderViewHeight; + maximumContentOffsetY = roundf(maximumContentOffsetY / onePixel) * onePixel; + if (object == self) { //Adjust self scroll offset when scroll down if (diff > 0 && _lock) {