     public var isSomewhereInHorizontalMiddle: Bool {
         return !isAtLeftEdge && !isAtRightEdge
     }
+
+    fileprivate var topInset: CGFloat {
+        if #available(iOS 11, *) {
+            return adjustedContentInset.top
+        } else {
+            return contentInset.top
+        }
+    }
+
+    fileprivate var bottomInset: CGFloat {
+        if #available(iOS 11, *) {
+            return adjustedContentInset.bottom
+        } else {
+            return contentInset.bottom
+        }
+    }
+
+    fileprivate var leftInset: CGFloat {
+        if #available(iOS 11, *) {
+            return adjustedContentInset.left
+        } else {
+            return contentInset.left
+        }
+    }
+
+    fileprivate var rightInset: CGFloat {
+        if #available(iOS 11, *) {
+            return adjustedContentInset.right
+        } else {
+            return contentInset.right
+        }
+    }
 }


extension UIScrollView: Scrollable {
    public var isAtTop: Bool {
        return (contentOffset.y + contentInset.top) == 0
    }
    
    public var isAtBottom: Bool {

    }
    
    public var isAtLeftEdge: Bool {
        return (contentOffset.x + leftInset) == 0
    }
    
    public var isAtRightEdge: Bool {
