Re: Problem scrolling a clip view
Re: Problem scrolling a clip view
- Subject: Re: Problem scrolling a clip view
- From: j o a r <email@hidden>
- Date: Mon, 21 May 2007 15:50:23 +0200
On 21 maj 2007, at 15.43, email@hidden wrote:
I'd like to programmatically scroll my clip view in a smooth fashion.
So I tried with the code below. It works, but the clip view is not
updated until the loop finishes, eg. the whole thing equals a 100
pixel jump without scroll. I cannot see any logical reason for this.
Please help.
The logical reason is probably that Cocoa by default is lazy with
display updates - They are typically postponed until the end of the
current event loop for performance reasons, and to provide a smoother
(less flickering) experience. This for example in contrast to the
default display behaviour in .NET on Windows.
I'm not sure if it will work for you in this case, but you might try
to tell the views involved to display immediately after each change,
using the "-display" method. For future reference, read up on the
difference between the "-display" and the "-setNeedsDisplay:" commands.
j o a r
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden