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
0
votes
2 answers
Force redraw with CADisplayLink
I'm currently using CADisplayLink to show an OpenGL animation which works great. Sometimes, however a parameter changes and I need to redraw the view immediately and can't wait until the next frame is requested by CADisplayLink. If I don't do that,…

hanno
- 6,401
- 8
- 48
- 80
0
votes
1 answer
CADisplayLink and static variable magic in Apple OpenGl ES Sample
I would like an explanation of why XCode's OpenGl ES Sample works, please. It does the following to start the drawFrame method (in the blablaViewController.m - name is dependent on the project's name):
//sets up a CADisplayLink to do a regular (draw…

rdrey
- 9,379
- 4
- 40
- 52
0
votes
0 answers
MTKView glitches/strobing while using a custom blur filter written in Metal
I am using CADisplayLink to live filter an image and showing it in the MTKView. All filters work fine until I try the blur filter - during that filter MTKView sometimes starts strobing, glitching or just showing a black screen on some of the frames…

SmartTree
- 1,381
- 3
- 21
- 40
0
votes
0 answers
Resolve FPS drop with touchesMoved?
In my SpriteKit game I have two sprites that rotate towards the point of touch. Also I have enemy sprites that fall from the top and travel down with increased frequency over time. After about thirty seconds of continuous touch with touchesMoved the…

stepjesse
- 37
- 6
0
votes
1 answer
Circle with fluid/strechy stroke
Me and my team are working on an app for a client. We are trying to understand how to achieve this kind of animations (refer only to the circle stroke) :
We tried using a CADisplayLink to set up and change the circle, but it generated non-fluid…

Roi Mulia
- 5,626
- 11
- 54
- 105
0
votes
1 answer
CADisplayLink problem animation iphone xcode
Hi everybody I'm french so scuse me for my bad english.
So my problem is when I use CADisplayLink to animate one image at 60fps, it works fine but when I want to animate two image I have near 40fps.
So what can I do.
please help me .
thank you.

arvin Arabi
- 253
- 1
- 7
- 21
0
votes
1 answer
UIScrollView contentOffset not updating when changed
Seeing an odd issue surrounding changing a scroll view's content offset property.
I have a CADisplayLink that calls a method every frame. This method calculates how much to adjust the content offset by to produce an auto scroll type effect.
@objc…

Jacob King
- 6,025
- 4
- 27
- 45
0
votes
1 answer
Correct way to initialize / sync OpenGL for NSView
I created a custom OpenGLView instead of using NSOpenGLView by following Apple's docs. Drawing seems fine except it seems I have thread sync issues here. Since NSView should be in main thread then how to sync threads, I mean CADisplayLink seems work…

recp
- 383
- 1
- 2
- 14
0
votes
1 answer
Why isn't CADisplayLink working in this case?
I want to use CADisplayLink instead of NSTimer for an animation of a ball which is just moving, but with CADisplayLink it doesn't work. What could be the problem in the following code?
#import "UntitledViewController.h"
@implementation…

arvin Arabi
- 253
- 1
- 7
- 21
0
votes
1 answer
iPhone/iPad, OpenGL ES, CADisplayLink
I've just started playing with OpenGL ES, mostly on iPad and have noticed some problems I cannot find the answer to. First I've tried using two EAGLViews using separate renderers in the same window. Basically think the OpenGL ES example project in…

j0h
- 1
- 1
0
votes
1 answer
How to run a Timer in connection the the display refresh rate?
I have an object who calculate the velocity of a scrolling area. When the user move up his finger off the screen, then this object fire an event every 10 ms to update the position of the scrolling (regarding to the calculated velocity) and refresh…
user8584960
0
votes
1 answer
How to resume core animation when the app back to foreground
I have an imageView and want it to rotate 360° all the time, but I found an issue which is that when the App enters background and then back to the foreground, the rotate animation will be stopped.
And I don't want to re-call the function…

Ringo
- 1,173
- 1
- 12
- 25
0
votes
0 answers
Swift 4 CADisplayLink without @objc
In swift 4 we are starting to get warnings when using @objc func, and I get that it's actually better to avoid it. I need to create a precise timer for animations, like CADisplayLink. The problem is that CADisplayLink is using #selector, and to use…

Damian Dudycz
- 2,622
- 19
- 38
0
votes
0 answers
touchesMoved stops CADisplayLink Animation
while i handle an action in touchesMoved my CADisplayLink Animation is paused. is there a possibility to run my CADisplayLink Animation in the background?
In moveBigPoints() i move all selected (Big-)Points of an bezier path with my finger touch...…

schaf
- 1
- 2
0
votes
2 answers
Updating UIProgressView via delegate method on AudioPlayer
I'm attempting to use CADisplayLink to update a UIProgressView. Here's CADisplayLink's initialiation signature
Here's a summary of the relevant variables from MyAudioPlayer class.
protocol AudioPlayerDelegate: class {
func updateSlider(sender:…

Adrian
- 16,233
- 18
- 112
- 180