Commit b862f893 by Daniel Dahan

updated FABMenu delegation calls

parent 30051a07
......@@ -372,7 +372,8 @@ extension FABMenu {
- Parameter completion: A completion block to execute on each view's animation.
*/
open func open(isTriggeredByUserInteraction: Bool, duration: TimeInterval = 0.15, delay: TimeInterval = 0, usingSpringWithDamping: CGFloat = 0.5, initialSpringVelocity: CGFloat = 0, options: UIViewAnimationOptions = [], animations: ((UIView) -> Void)? = nil, completion: ((UIView) -> Void)? = nil) {
if isTriggeredByUserInteraction && delegate?.fabMenuShouldOpen?(fabMenu: self) == false {
if isTriggeredByUserInteraction && false == delegate?.fabMenuShouldOpen?(fabMenu: self) {
return
}
......@@ -426,7 +427,7 @@ extension FABMenu {
*/
open func close(isTriggeredByUserInteraction: Bool, duration: TimeInterval = 0.15, delay: TimeInterval = 0, usingSpringWithDamping: CGFloat = 0.5, initialSpringVelocity: CGFloat = 0, options: UIViewAnimationOptions = [], animations: ((UIView) -> Void)? = nil, completion: ((UIView) -> Void)? = nil) {
if isTriggeredByUserInteraction && delegate?.fabMenuShouldClose?(fabMenu: self) == false {
if isTriggeredByUserInteraction && false == delegate?.fabMenuShouldClose?(fabMenu: self) {
return
}
......
......@@ -259,12 +259,12 @@ extension CALayer {
return
}
if 0 == frame.width {
frame.size.width = frame.height
if 0 == bounds.width {
bounds.size.width = bounds.height
}
if 0 == frame.height {
frame.size.height = frame.width
if 0 == bounds.height {
bounds.size.height = bounds.width
}
guard .circle == shapePreset else {
......@@ -274,7 +274,7 @@ extension CALayer {
}
masksToBounds = true
cornerRadius = frame.size.width / 2
cornerRadius = bounds.width / 2
}
/// Sets the shadow path.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment