Skip to content

Commit

Permalink
customNormalIconView and customSelectedIconView can't be nil. I'm…
Browse files Browse the repository at this point in the history
… using ionicons-fonts not images. I can't see the reason why I need to set any images. (7f2a3f8) It might be legacy code form wayback when the delegate methods were introduced or software engineering bureaucracy. Either way, good job Alex.k for making this project possible. Only he could just push a tiny bit further :p

See issue50 Ramotion#50
  • Loading branch information
Michael Tai committed Jun 29, 2018
1 parent e02c17d commit d378620
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions CircleMenuLib/CircleMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -370,13 +370,10 @@ open class CircleMenu: UIButton {

hideCenterButton(duration: 0.3)
showCenterButton(duration: 0.525, delay: duration)

if customNormalIconView != nil && customSelectedIconView != nil {

DispatchQueue.main.asyncAfter(deadline: .now() + duration, execute: {
self.delegate?.circleMenu?(self, buttonDidSelected: sender, atIndex: sender.tag)
})
}

DispatchQueue.main.asyncAfter(deadline: .now() + duration, execute: {
self.delegate?.circleMenu?(self, buttonDidSelected: sender, atIndex: sender.tag)
})
}

// MARK: animations
Expand Down

0 comments on commit d378620

Please sign in to comment.