Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion WMPageController/WMMenuView/WMMenuView.m
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down