在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开始图层动画的代码: //mySuperLayer父图层 CFTimeInterval pausedTime = [self.mySuperLayer timeOffset]; if (pausedTime > 0)//在暂停后才能使用 { self.mySuperLayer.speed = 1.0; self.mySuperLayer.timeOffset = 0.0; self.mySuperLayer.beginTime = 0.0; CFTimeInterval timeSincePause = [self.mySuperLayer convertTime:CACurrentMediaTime() fromLayer:nil] - pausedTime; self.mySuperLayer.beginTime = timeSincePause; } 暂停图层动画的代码: CFTimeInterval pausedTime = [self.mySuperLayer convertTime:CACurrentMediaTime() fromLayer:nil]; self.mySuperLayer.speed = 0.0; self.mySuperLayer.timeOffset = pausedTime;
例子下载:https://github.com/yoimhere/ZJLoadView/archive/master.zip
|
请发表评论