mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 04:57:03 +00:00
fixed: CPScrollView did not send some notifications
This commit is contained in:
@@ -94,6 +94,10 @@ var TIMER_INTERVAL = 0.2,
|
||||
|
||||
CPScrollViewFadeOutTime = 1.3;
|
||||
|
||||
var CPScrollViewWillStartLiveScrollNotification = @"CPScrollViewWillStartLiveScrollNotification",
|
||||
CPScrollViewDidLiveScrollNotification = @"CPScrollViewDidLiveScrollNotification",
|
||||
CPScrollViewDidEndLiveScrollNotification = @"CPScrollViewDidEndLiveScrollNotification";
|
||||
|
||||
var CPScrollerStyleGlobal = CPScrollerStyleOverlay,
|
||||
CPScrollerStyleGlobalChangeNotification = @"CPScrollerStyleGlobalChangeNotification";
|
||||
|
||||
@@ -987,6 +991,8 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
[self _sendDelegateMessages];
|
||||
|
||||
[_contentView scrollToPoint:contentBounds.origin];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPScrollViewDidLiveScrollNotification object:self];
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
@@ -1025,6 +1031,8 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
|
||||
[_contentView scrollToPoint:contentBounds.origin];
|
||||
[_headerClipView scrollToPoint:CGPointMake(contentBounds.origin.x, 0.0)];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPScrollViewDidLiveScrollNotification object:self];
|
||||
}
|
||||
|
||||
/* @ignore */
|
||||
@@ -1035,6 +1043,7 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
|
||||
if (!_scrollTimer)
|
||||
{
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPScrollViewWillStartLiveScrollNotification object:self];
|
||||
[self _scrollViewWillScroll];
|
||||
_scrollTimer = [CPTimer scheduledTimerWithTimeInterval:TIMER_INTERVAL target:self selector:@selector(_scrollViewDidScroll) userInfo:nil repeats:YES];
|
||||
}
|
||||
@@ -1073,6 +1082,8 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
[_contentView scrollToPoint:constrainedOrigin];
|
||||
[_headerClipView scrollToPoint:CGPointMake(constrainedOrigin.x, 0.0)];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPScrollViewDidLiveScrollNotification object:self];
|
||||
|
||||
if (extraX || extraY)
|
||||
[enclosingScrollView _respondToScrollWheelEventWithDeltaX:extraX deltaY:extraY];
|
||||
}
|
||||
@@ -1092,6 +1103,8 @@ Notifies the delegate when the scroll view has finished scrolling.
|
||||
|
||||
if (_implementedDelegateMethods & CPScrollViewDelegate_scrollViewDidScroll_)
|
||||
[_delegate scrollViewDidScroll:self];
|
||||
|
||||
[[CPNotificationCenter defaultCenter] postNotificationName:CPScrollViewDidEndLiveScrollNotification object:self];
|
||||
}
|
||||
|
||||
/*! @ignore*/
|
||||
|
||||
Reference in New Issue
Block a user