Alternate to scrollPoint?
Alternate to scrollPoint?
- Subject: Alternate to scrollPoint?
- From: Steve Mills <email@hidden>
- Date: Mon, 23 Sep 2013 17:02:46 -0500
We have a situation where we want to call scrollPoint on our view that's in a scroll view. It appears that scrollPoint does not immediately cause the scroll to happen. Right after we call scrollPoint, we need to ask the view for its new scroll location to see if it actually changed. At this point, it has not scrolled yet, so it breaks this code that used to work in Carbon.
It appears that scrollPoint is causing an animation to be queued, even though we tried to disable it like so:
[CATransaction begin];
[CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions];
[CATransaction setAnimationDuration:0];
[view scrollPoint:pos];
[CATransaction commit];
The animation is in our way. I found a workaround that seems to work, which is to simply call this instead of all that:
[[[view enclosingScrollView] contentView] setBoundsOrigin:pos];
Is this a viable workaround? Can anyone foresee any problems with it? Is there a better way to make scrollPoint work *right now*?
--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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