• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Alternate to scrollPoint?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Alternate to scrollPoint?
      • From: Kyle Sluder <email@hidden>
    • Re: Alternate to scrollPoint?
      • From: Steve Mills <email@hidden>
  • Prev by Date: iOS 7 Extend Edges View Controller Property
  • Next by Date: outlets in objects loaded from nibs
  • Previous by thread: iOS 7 Extend Edges View Controller Property
  • Next by thread: Re: Alternate to scrollPoint?
  • Index(es):
    • Date
    • Thread