Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions FadeButton/FadeButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ extension FadeButton {

extension FadeButton {

open override func setBackgroundImage(_ image: UIImage?, for state: UIControlState) {
open override func setBackgroundImage(_ image: UIImage?, for state: UIControl.State) {
super.setBackgroundImage(image, for: state)
if state == .highlighted {
self.configureOverlayBackgroundImage()
}
}

open override func setImage(_ image: UIImage?, for state: UIControlState) {
open override func setImage(_ image: UIImage?, for state: UIControl.State) {
super.setImage(image, for: state)
if state == .highlighted {
self.configureOverlayImage()
}
}

open override func setTitle(_ title: String?, for state: UIControlState) {
open override func setTitle(_ title: String?, for state: UIControl.State) {
super.setTitle(title, for: state)
if state == .highlighted {
self.configureOverlayLabel()
Expand Down Expand Up @@ -138,7 +138,7 @@ extension FadeButton {

fileprivate func fadeOutOverlays() {
let duration = TimeInterval(exactly: self.fadeDuration)!
UIView.animate(withDuration: duration) { animations in
UIView.animate(withDuration: duration) {
self.overlayBackgroundImage.alpha = 0
self.overlayImage.alpha = 0
self.overlayLabel.alpha = 0
Expand Down