 extension PullToActionController: UIScrollViewDelegate {
     open func scrollViewDidEndDragging(_ scrollView: UIScrollView, willDecelerate decelerate: Bool) {
         //TODO: consider content inset
-        let topOffset = self.offset.y
+        let topOffset = offset.y
         if topOffset < 0.0 {
             DDLogDebug("[PullToAction] End dragging <- \(topOffset)")
-            self.delegate?.scrollViewDidEndDraggingOutsideTopBound?(with: topOffset)
+            delegate?.scrollViewDidEndDraggingOutsideTopBound?(with: topOffset)
             return
         }
 
-        let bottomOffset = self.offset.y + scrollView.bounds.height - self.size.height
+        let bottomOffset = offset.y + scrollView.bounds.height - size.height
         if bottomOffset > 0.0 {
             DDLogDebug("[PullToAction] End dragging -> \(bottomOffset)")
-            self.delegate?.scrollViewDidEndDraggingOutsideBottomBound?(with: bottomOffset)
+            delegate?.scrollViewDidEndDraggingOutsideBottomBound?(with: bottomOffset)
             return
         }
     }


        switch baseLine {
        case .top:
            return Double(self.offset.y)
        case .bottom:
            return Double(self.offset.y - max(self.size.height - scrollView.bounds.height, 0.0))
        case .left:
            return Double(self.offset.x)
        case .right:
            return Double(self.offset.x - max(self.size.width - scrollView.bounds.width, 0.0))
        }
    }
}

}

public class PullToActionController: NSObject {
    weak var scrollView: UIScrollView? // ???: Should I make this strong?
    weak var delegate: PullToActionDelagete?

    var offset: CGPoint = .zero
    var size: CGSize = .zero
    var inset: UIEdgeInsets = .zero
    fileprivate var progressActions = Dictionary<String, OffsetRange>()

    // MARK: -
    init(scrollView: UIScrollView) {
        self.scrollView = scrollView

        super.init()

        scrollView.delegate = self // TODO: forward message to original delegate of the scroll view.
