转场动画与wrPopProgress计算问题
yexiannan opened this issue · 1 comments
yexiannan commented
yexiannan commented
暂时将计算进度时小数点第一位后向上取整解决
static CGFloat wrPopDuration = 0.12;
static int wrPopDisplayCount = 0;
- (CGFloat)wrPopProgress {
CGFloat all = 60 * wrPopDuration;
int current = MIN(all, wrPopDisplayCount);
CGFloat progress = current / all;
return ceilf(progress * 10) / 10.f;
}
static CGFloat wrPushDuration = 0.10;
static int wrPushDisplayCount = 0;
- (CGFloat)wrPushProgress {
CGFloat all = 60 * wrPushDuration;
int current = MIN(all, wrPushDisplayCount);
CGFloat progress = current / all;
return ceilf(progress * 10) / 10.f;
}
转场动画持续时间修改无效可能跟苹果动画效果改为usingSpringWithDamping有关