From c3c767bd37ec2b1627061d37d28125fbaac8b59b Mon Sep 17 00:00:00 2001 From: Luke Zhao Date: Thu, 1 Mar 2018 11:54:08 +0900 Subject: [PATCH] fix 2x mode on ipad --- Sources/Extensions/CALayer+Hero.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Extensions/CALayer+Hero.swift b/Sources/Extensions/CALayer+Hero.swift index 1f5487e1..642da1a3 100644 --- a/Sources/Extensions/CALayer+Hero.swift +++ b/Sources/Extensions/CALayer+Hero.swift @@ -35,7 +35,7 @@ internal extension CALayer { func flatTransformTo(layer: CALayer) -> CATransform3D { var layer = layer var trans = layer.transform - while let superlayer = layer.superlayer, superlayer != self { + while let superlayer = layer.superlayer, superlayer != self, !(superlayer.delegate is UIWindow) { trans = CATransform3DConcat(superlayer.transform, trans) layer = superlayer }