From 667d18008546bc8620fa7421887448e1267f4e80 Mon Sep 17 00:00:00 2001 From: Ryan Nystrom Date: Fri, 12 Oct 2018 22:06:39 -0400 Subject: [PATCH] keep read layer in front when animating inbox --- Classes/Notifications/NotificationCell.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/Notifications/NotificationCell.swift b/Classes/Notifications/NotificationCell.swift index cfc352b55..285c92043 100644 --- a/Classes/Notifications/NotificationCell.swift +++ b/Classes/Notifications/NotificationCell.swift @@ -149,6 +149,8 @@ final class NotificationCell: SelectableCell, CAAnimationDelegate { readLayer.bounds = readButton.bounds readLayer.position = convert(readButton.center, from: readButton.superview) readLayer.transform = CATransform3DMakeScale(20, 20, 20) + // keep the read layer in front + readLayer.superlayer?.addSublayer(readLayer) CATransaction.commit() } @@ -241,6 +243,8 @@ final class NotificationCell: SelectableCell, CAAnimationDelegate { self.dimViews(dim: true) } + // keep the read layer in front + readLayer.superlayer?.addSublayer(readLayer) hideReadLayer(hide: false) let scale = CABasicAnimation(keyPath: "transform.scale")