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
1 answer
CADisplayLink is not providing proper time interval between consecutive frames
Its my first post . Any mistake , please bear with me .
I am new to iPhone development . I was using CADisplayLink to execute "Update" loop of my game . In XCode 8.2 I am using following code to calculate deltaTime between two consecutive frames…

Ashish Tosh
- 13
- 5
0
votes
1 answer
Slow CADisplayLink Animation In Simulator
I have two methods of achieving the same sprite animation:
An UIImage that animates an array of 6 images using animatedImage(with:duration:).
A UIView with its CALayer’s contents property set to a sprite atlas image—the layer’s contentsRect…

JWK
- 3,345
- 2
- 19
- 27
0
votes
2 answers
Constant-velocity rotation in OpenGL ES view using CADisplayLink on iPhone
My OpenGL ES classes and code are derived from Apple's GLES2Sample code sample. I use them to show 3D objects rotating smoothly around one axis, at what I expect to be a constant rotation speed. Currently, the app uses a frame interval of 1, and…

F'x
- 12,105
- 7
- 71
- 123
0
votes
1 answer
timestamp vs 1/60 for CADisplayLink
I am currently using CADisplayLink to perform some specific deceleration animation. I set the frameInterval to 1. I have seen some open source projects just use 1/60 second as time delta between frame updates. I found there is also a timestamp…

crab oz
- 635
- 7
- 16
0
votes
1 answer
UIView contains NSTimer - not releasing
I'm using one UIView subclass that has some CAAnimation which would be performed after performsegue from another class. In the UIView class, I'm using CADisplayLink and NSTimer to increment the CATextLayer used in the animation. Whenever, I came…

Pradheep Narendran P
- 419
- 3
- 16
0
votes
1 answer
CADisplayLink can't stop after invalidated
I have two UIButton, the first button will trigger the CustomeView's - beginAnimation and the other one will trigger the - endAnimation. when I rapidly press these two button in turn, like begin -> end -> begin -> end -> begin -> end, I found that…

Illya
- 13
- 4
0
votes
4 answers
NSTimer Milliseconds Accuracy
I've got a 9 figure number that needs to be incremented by 500 each second, but i decided to increment the number each milliseconds and update the label that displays the number. I'm using a NSTimer but as i've read everywhere around they're not…

Sam Bing
- 2,794
- 1
- 19
- 29
0
votes
1 answer
Button stops moving when creating new button who moves
I'm creating a game where a button who is being created moves from one side of the screen to the other when I click a button called start. The problem is that when I click start before the button who was moving reaches its end point, it stops…

Anton O.
- 653
- 7
- 27
0
votes
1 answer
How to use CADisplayLink for a specific button?
I'm trying to make an application where i have to touch a button who is moving up the screen. I am using CADisplayLinkfor this. The problem in my code is that its creating a new button instead of using a specific one:
@IBOutlet var label:…

Anton O.
- 653
- 7
- 27
0
votes
1 answer
how to use CADisplaylink in mainRunloop to cycle call a method in which I changed a view's position to show a animation
I want to show an animation in my view .so I used CADisplaylink as a timer so that it will call the update method 60 times in a second (60FPS).
But when the tableview which in the same superview reload ,the CADisplaylink called only 40-50times a…

SnowKing
- 13
- 4
0
votes
1 answer
can I make glsl bail out of a loop when it's been running too long?
I'm doing some glsl fractals, and I'd like to make the calculations bail if they're taking too long to keep the frame rate up (without having to figure out what's good for each existing device and any future ones).
It would be nice if there were a…

Kaolin Fire
- 2,521
- 28
- 43
0
votes
1 answer
CADisplaylink differences between simulator and physical device
I've been building an OpenGL based app using GLKView, with a render method being triggered by CADisplaylink.
So far so good, at least on the simulator.. But when I run it on a physical device, my update routine is only fired once - at startup.
I…

Tim Kane
- 2,599
- 3
- 20
- 19
0
votes
1 answer
How to set up a delay in a CADisplayLink
I am using a CADisplayLink to animate 10 different buttons but the buttons are all clumped together. So my question is how can I implement a delay to make each button animate at a different time so they are not all clumped together.
var…

Garret Kaye
- 2,412
- 4
- 21
- 45
0
votes
1 answer
How to generate an array of buttons using a for-in-loop and then animate them with a CADisplayLink
Im trying to generate an array of 10 buttons using a for-in-loop and then animating them using a for-in-loop that is inside of a CADisplayLink but the problem is that only one button is being created and animated. Please Help! Thanks in advance!
var…

Garret Kaye
- 2,412
- 4
- 21
- 45
0
votes
1 answer
How to implement a CADisplayLink into a for in loop
So I am generating a bunch of dot objects using a for in loop and I am animating them across the screen using UIView.animationWithDuration; however, I want to replace the animationWithDurations with CADisplayLinks so that the user is able t interact…

Garret Kaye
- 2,412
- 4
- 21
- 45