From 3f95db0fca0f3a9672fc117b6d84048777b0ce11 Mon Sep 17 00:00:00 2001 From: Mahesh Agrawal Date: Mon, 21 Nov 2016 12:49:56 +0530 Subject: [PATCH] Fixed issue of blinking, when you use image and text both with the ripple button. --- Classes/ZFRippleButton.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Classes/ZFRippleButton.swift b/Classes/ZFRippleButton.swift index 33adcfa..2608eff 100755 --- a/Classes/ZFRippleButton.swift +++ b/Classes/ZFRippleButton.swift @@ -85,6 +85,10 @@ open class ZFRippleButton: UIButton { rippleBackgroundView.alpha = 0 addSubview(rippleBackgroundView) + if self.imageView != nil{ + self.bringSubview(toFront: self.imageView!) + } + layer.shadowRadius = 0 layer.shadowOffset = CGSize(width: 0, height: 1) layer.shadowColor = UIColor(white: 0.0, alpha: 0.5).cgColor