From eae89970c526942a19748b116093c08d874a74e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C?= Date: Tue, 29 Dec 2020 20:05:16 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8DStickyWMStickyPag?= =?UTF-8?q?eController=20=E5=81=B6=E7=8E=B0=E6=BB=9A=E5=8A=A8=E4=B8=8D?= =?UTF-8?q?=E4=BA=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StickyExample/WMStickyPageController/WMMagicScrollView.m | 3 +++ 1 file changed, 3 insertions(+) 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) { From c30879c271d4d1bd505acad2dadc5d0693d8d263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E4=B8=9C?= Date: Thu, 1 Apr 2021 19:11:23 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[fix]=20=E4=BF=AE=E5=A4=8D=E5=90=8C?= =?UTF-8?q?=E4=B8=80=E4=B8=AAitem=E5=8F=AF=E9=80=89=E4=B8=AD=E5=A4=9A?= =?UTF-8?q?=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WMPageController/WMMenuView/WMMenuView.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {