- (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)];
}
}
Dans le code ci-dessus j'ai besoin d'animer le défilement. Comment puis-je atteindre cet objectif? Merci.Comment animer un point de défilement?
vous étiez en mesure de comprendre comment? On dirait une demande assez simple ... – Chetan
@Chetan: +1, je voudrais savoir cela aussi – Dov