jjzjj

framedrops

全部标签

swift - 创建没有 framedrops 的无尽 cgpath

我需要连续创建一个cgpath。目前我是这样做的:funccreateLine(){varrand=randomBetweenNumbers(1,2)currentY--ifrand然后这样调用它:NSTimer.scheduledTimerWithTimeInterval(0.05,target:self,selector:Selector("startTile"),userInfo:nil,repeats:true)但问题是,随着时间的推移,帧数越来越低。有什么我必须改变的,以便帧率不再下降吗?我的目标是创造一条随机的无尽路径。 最佳答案

swift - 创建没有 framedrops 的无尽 cgpath

我需要连续创建一个cgpath。目前我是这样做的:funccreateLine(){varrand=randomBetweenNumbers(1,2)currentY--ifrand然后这样调用它:NSTimer.scheduledTimerWithTimeInterval(0.05,target:self,selector:Selector("startTile"),userInfo:nil,repeats:true)但问题是,随着时间的推移,帧数越来越低。有什么我必须改变的,以便帧率不再下降吗?我的目标是创造一条随机的无尽路径。 最佳答案