【发布时间】:2013-12-19 08:21:58
【问题描述】:
谁能说当我将图像打开到全屏时如何在 facebook 应用程序中实现过渡转场?
但它在 ios7 上的过渡期间闪烁,我不明白如何修复它(有任何想法吗?
【问题讨论】:
标签: xcode facebook transition segue
谁能说当我将图像打开到全屏时如何在 facebook 应用程序中实现过渡转场?
但它在 ios7 上的过渡期间闪烁,我不明白如何修复它(有任何想法吗?
【问题讨论】:
标签: xcode facebook transition segue
闪烁是由创建的临时图像引起的,该图像是为了模拟在图像在新视图中取消隐藏之前被移除的过渡。我将完成块更改为延迟 0.25 秒以使图像不被隐藏。
[UIView animateWithDuration:0.4f delay:.0f options:UIViewAnimationOptionCurveEaseInOut animations:^{
imageView.frame = dest;
if (self.unwinding) {
[self.destinationViewController dismissViewControllerAnimated:YES completion:nil];
} else {
((UIViewController *)self.destinationViewController).modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self.sourceViewController presentViewController:self.destinationViewController animated:YES completion:nil];
}
} completion:^(BOOL completed) {
int64_t delayInSeconds = 1;
dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, delayInSeconds * NSEC_PER_SEC/4);
dispatch_after(popTime, dispatch_get_main_queue(), ^(void){
imageView.hidden = YES;
[imageView removeFromSuperview];
});
}];
【讨论】: