- (void)mouseDragged:(NSEvent *)theEvent {
NSSize dynamicImageSize;
dynamicImageSize = [[self image] size];
NSSize contentSize = [(NSScrollView*)[[self superview] superview] contentSize];
if(dynamicImageSize.height > contentSize.height || dynamicImageSize.width > contentSize.width)
{
float x = startOrigin.x - ([theEvent locationInWindow].x - startPt.x);
float y = startOrigin.y - ([theEvent locationInWindow].y - startPt.y);
[self scrollPoint:NSMakePoint(x, y)];
}
}
在上面的代碼中,我需要爲滾動設置動畫。我怎樣才能做到這一點? 謝謝。如何動畫滾動條?
是你能弄清楚如何?似乎是一個非常簡單的請求... – Chetan 2011-06-01 18:34:12
@Chetan:+1,我想知道這也 – Dov 2011-07-08 13:36:56