Commit b862f893 by Daniel Dahan

updated FABMenu delegation calls

parent 30051a07
...@@ -372,7 +372,8 @@ extension FABMenu { ...@@ -372,7 +372,8 @@ extension FABMenu {
- Parameter completion: A completion block to execute on each view's animation. - 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) { 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 return
} }
...@@ -426,7 +427,7 @@ extension FABMenu { ...@@ -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) { 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 return
} }
......
...@@ -259,12 +259,12 @@ extension CALayer { ...@@ -259,12 +259,12 @@ extension CALayer {
return return
} }
if 0 == frame.width { if 0 == bounds.width {
frame.size.width = frame.height bounds.size.width = bounds.height
} }
if 0 == frame.height { if 0 == bounds.height {
frame.size.height = frame.width bounds.size.height = bounds.width
} }
guard .circle == shapePreset else { guard .circle == shapePreset else {
...@@ -274,7 +274,7 @@ extension CALayer { ...@@ -274,7 +274,7 @@ extension CALayer {
} }
masksToBounds = true masksToBounds = true
cornerRadius = frame.size.width / 2 cornerRadius = bounds.width / 2
} }
/// Sets the shadow path. /// 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