A CADisplayLink object is a timer object that allows your application to synchronize its drawing to the refresh rate of the display.
Questions tagged [cadisplaylink]
137 questions
1
vote
1 answer
Pause and resume CADisplayLink between storyboards
I have a CADisplayLink set up for my gameloop that handles the animation loop.
When the game is over I show another storyboard with the game result.
At that storyboard the user can choose to Try again. And if so I choose to show the game storyboard…

matsmats
- 502
- 3
- 12
1
vote
1 answer
Convert CADisplayLink.timestamp CFTimeInterval to host time (uint64)
I am getting a callback from CADisplayLink. The link has a timestamp in CFTimeInterval. How to you convert that timestamp to hosttime in uint64?
Thanks!

kungfoo
- 597
- 5
- 16
1
vote
1 answer
Why does dispatch_semaphore_wait() return YES all the time even when I'm not scrolling?
Brad Larson delivered a solution for the CADisplayLink freeze issue when scroll views are scrolling.
My OpenGL ES draw method is called by a CADisplayLink, and I tried Brad's technique but can't make it work. The core problem is that my OpenGL ES…

Proud Member
- 40,078
- 47
- 146
- 231
1
vote
0 answers
Order of runloop events with CADisplayLink and Touch events?
I would like to know if the touch events are called before the displayLink in the same runloop cycle. Does anyone know the answer to this?

Xavier
- 8,828
- 13
- 64
- 98
1
vote
1 answer
iOS OpenGL ES 1.1 jerky animation using CADisplayLink (reboot fixes for a while)
I'm using OpenGL ES 1.1 and CADisplayLink to animate a 3d scene. If the iOS device has been rebooted fairly recently, the animation is smooth and the time delta between two displayLink.timestamp calls is fairly even. But after a few hours or days of…

timthecoder
- 51
- 6
1
vote
1 answer
IOS : CADisplay / UIScrollview and Navigation Controller
So I have managed to get my lovely GLKit 3D menu working with a UIScrollview and life is good until I push to another view controller and come back.
So completely smooth movement, move to next controller and come back. UIScrollview does not bounce…

Burf2000
- 5,001
- 14
- 58
- 117
0
votes
1 answer
On the iPhone, is it possible for a touchesBegan:withEvent to fire while a CADisplayLink callback method is executing?
Wouldn't the touchesBegan:withEvent always fire "before" or "after" each iteration of the CADisplayLink callback?
Edit: Here's my CADisplayLink instantiation:
CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self…

Ryan
- 5,883
- 13
- 56
- 93
0
votes
1 answer
Example of image animation using only Core Graphics and CADisplayLink
I am looking for an example of an image animation (animation using images from file) done with Core Graphics and CADisplayLink (Not UIKit, CAANimation, CALayer). real low level stuff. Does anyone know of such an example?
Thanks.

Zigglzworth
- 6,645
- 9
- 68
- 107
0
votes
2 answers
call a method one time from another method which have a CADisplayLink on it
I would like to call from a method 'method1' another method 'method2'. The problem is that there is a CADisplayLink on 'method1' and when I want to call 'method2' from 'method1' it call it at 6Ofps so 60 times per second, but I just want that it…

jean bernard
- 257
- 2
- 3
- 10
0
votes
1 answer
Adding a CADisplayLink to Cocos2D
I have Cocos2D in my app and I use it as the game engine for my game. At this point I need to have a game loop fire at the rate the screen refreshes. So this leads me to think that I need to use CADisplayLink. So how would I implement CADisplayLink…

SimplyKiwi
- 12,376
- 22
- 105
- 191
0
votes
0 answers
What the CADisplayLink's timestamp actually is?
I've been playing with functionality of CADisplayLink to programmatically monitor rendering performance in an iOS app. Also spent quite some time in Instruments, of course, but curious of what it looks like in the field and for specific screens in…

Paul E.
- 1,889
- 1
- 12
- 15
0
votes
0 answers
Determine when animating UIView is intersecting/overlapping another view in Swift for iOS
I have a ViewController with five UILabels in my Swift project for iOS, as follows:
I'm animating the first UILabel (Label 1) so it slides all the way to the right of the screen, and I want to be able to determine when it intersects with each of…

user4496950
- 93
- 1
- 1
- 11
0
votes
1 answer
Timer 1 ms resolution for iOS
In my app I have an object(Car image) that needs to move on the screen.
I need to schedule myFunction every 1ms if possible.
I read apple documentation and I understood that NSTimer resolution is limited to 50-100ms, which is not enough for my use…

simoscream
- 135
- 1
- 9
0
votes
1 answer
have multiple CADisplayLink on xcode
I would like to know if it is possible to have two CADisplayLink in an app ?
sorry for my english I'm french

bernard langue
- 147
- 1
- 10
0
votes
1 answer
How do I invalidate CADisplayLink with a UIButton?
Extreme noob. I define a CADisplayLink, then I want to invalidate it later using a UIButton. I get the error 'cannot find in scope' because (I assume) the link is initialized inside the func. Cannot figure out how to "get inside" the func to…

VC25P
- 3
- 3