Skip to content

Commit

Permalink
Merge pull request #19 from Banck/fix/disabling-gradient
Browse files Browse the repository at this point in the history
Fixed disabling gradient
  • Loading branch information
pmusolino authored Aug 18, 2019
2 parents cc36ae9 + afd87b3 commit c49493d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/PMSuperButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,12 @@ open class PMSuperButton: UIButton {
var gradient: CAGradientLayer?

func setupGradient(){
gradient?.removeFromSuperlayer()

guard gradientEnabled != false else{
return
}

gradient?.removeFromSuperlayer()
gradient = CAGradientLayer()
guard let gradient = gradient else { return }

Expand Down

0 comments on commit c49493d

Please sign in to comment.