Skip to content

Commit

Permalink
made data source and delegate weak
Browse files Browse the repository at this point in the history
  • Loading branch information
alexanderkhitev committed Nov 21, 2016
1 parent 7acc6de commit c377d2b
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Pod/Classes/ArrayEx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@
import Foundation

extension Array {

func each(_ f: (Element) -> ()) {
for item in self {
f(item)
}
}

}
1 change: 1 addition & 0 deletions Pod/Classes/CGPointEx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,5 @@ extension CGPoint {
return nil
}


}
3 changes: 3 additions & 0 deletions Pod/Classes/CGRectEx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@ import Foundation
import UIKit

extension CGRect {

var rightBottom: CGPoint {
get {
return CGPoint(x: origin.x + width, y: origin.y + height)
}
}

var center: CGPoint {
get {
return origin.plus(rightBottom).mul(0.5)
}
}

}
4 changes: 2 additions & 2 deletions Pod/Classes/LiquidFloatingActionButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ open class LiquidFloatingActionButton : UIView {
}
}

open var delegate: LiquidFloatingActionButtonDelegate?
open var dataSource: LiquidFloatingActionButtonDataSource?
weak open var delegate: LiquidFloatingActionButtonDelegate?
weak open var dataSource: LiquidFloatingActionButtonDataSource?

open var responsible = true
open var isOpening: Bool {
Expand Down
3 changes: 3 additions & 0 deletions Pod/Classes/LiquidUtil.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func withBezier(_ f: (UIBezierPath) -> ()) -> UIBezierPath {
}

extension CALayer {

func appendShadow() {
shadowColor = UIColor.black.cgColor
shadowRadius = 2.0
Expand All @@ -29,9 +30,11 @@ extension CALayer {
shadowRadius = 0.0
shadowColor = UIColor.clear.cgColor
}

}

class CGMath {

static func radToDeg(_ rad: CGFloat) -> CGFloat {
return rad * 180 / CGFloat(M_PI)
}
Expand Down
1 change: 1 addition & 0 deletions Pod/Classes/LiquittableCircle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,6 @@ open class LiquittableCircle : UIView {
open override func draw(_ rect: CGRect) {
drawCircle()
}


}
1 change: 1 addition & 0 deletions Pod/Classes/SimpleCircleLiquidEngine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,5 @@ class SimpleCircleLiquidEngine {
return distance - circle.radius - other.radius < radiusThresh
}


}
1 change: 1 addition & 0 deletions Pod/Classes/UIColorEx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,5 @@ extension UIColor {
alpha: 1.0
)
}

}

0 comments on commit c377d2b

Please sign in to comment.