                 return
             }
 
-            self.offset = newOffsetValue.cgPointValue
+            offset = newOffsetValue.cgPointValue
 
-            guard let delegateFunction = self.delegate?.scrollViewContentOffsetProgress else { return }
+            guard let delegateFunction = delegate?.scrollViewContentOffsetProgress else {
+                return
+            }
+
             var progress = [String: Double]()
-            for (name, actionOffset) in self.progressAction {
-                let progressValue = actionOffset.progress(for: self.currentOffset(relativeTo: actionOffset.baseLine))
+            for (name, actionOffset) in progressActions {
+                let progressValue = actionOffset.progress(for: currentOffset(relativeTo: actionOffset.baseLine))
                 progress.updateValue(progressValue, forKey: name)
             }
             delegateFunction(progress)


            let newSize = newSizeValue.cgSizeValue

            guard abs(self.size.width - newSize.width) > 0.1 || abs(self.size.height - newSize.height) > 0.1 else {
                return
            }

            self.size = newSize

            DDLogVerbose("[PullToAction] contentSize:w: \(self.size.width) h:\(self.size.height)")
            self.delegate?.scrollViewContentSizeDidChange?(self.size)
        }

        if keyPath == "contentInset" {
            guard let changes = change, let newInsetValue = changes[.newKey] as? NSValue else { return }
            self.inset = newInsetValue.uiEdgeInsetsValue
            DDLogVerbose("[PullToAction] inset: top: \(self.inset.top) bottom: \(self.inset.bottom)")
        }
    }



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