简体   繁体   English

对于iPad和iPhone来说,使用CADisplayLink必须是60fps吗?

[英]Is it true that for iPad and iPhone, using CADisplayLink must be for 60fps?

In other words, can we choose to invoke the handler at 20 times per second, or at 45 times per second, or must it be 60 times per second? 换句话说,我们可以选择每秒20次调用处理程序,或者每秒调用45次,还是每秒调用60次?

I guess one way to simulate it will be to use the timestamp given to the handler to determine if it is "time for action yet" -- if not, simply return without doing anything? 我想一种模拟它的方法是使用给予处理程序的时间戳来确定它是否还是“行动的时间” - 如果不是,只需返回而不做任何事情?

You can use the frameInterval property to invoke the handler every 60/n frames, where n is a positive integer. 您可以使用frameInterval属性每60/n帧调用一个处理程序,其中n是一个正整数。

You can't invoke the handler 45 times per second, but the following values are possible: 60 , 30 , 20 , 15 , 12 , ... 你不能调用处理45次每秒,但以下值: 6030201512 ,...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM