                 (item: ScrollableItem, val: CGFloat) in
                 item.scrollView.contentOffset.y = val
             }
+
+            onCall("animatedScrollTo") {
+                (item: ScrollableItem, args: [Any?]) in
+                let x = (args[0] as! Number).float()
+                let y = (args[1] as! Number).float()
+                item.animatedScrollTo(x, y)
+            }
         }
 
-        class Delegate: UIViewController, UIScrollViewDelegate {
+        class NeftUIScrollView: UIScrollView, UIScrollViewDelegate {
             weak var scrollable: ScrollableItem?
 
-            func scrollViewDidScroll(_ scrollView: UIScrollView) {
+            override func didMoveToWindow() {
+                super.didMoveToWindow()
+                delegate = self
+            }
+
+            override func layoutSubviews() {
+                super.layoutSubviews()
+
+                guard scrollable?.contentItem != nil else { return }
+                scrollable!.scrollView.contentSize = scrollable!.contentItem!.view.layer.bounds.size
+            }
+
+            internal func scrollViewDidScroll(_ scrollView: UIScrollView) {
                 guard scrollable != nil else { return }
                 let offset = scrollView.contentOffset
                 scrollable!.pushEvent(event: "contentXChange", args: [offset.x])


        init() {
            super.init(itemView: UIView())
            view.addSubview(scrollView)
            delegate.scrollable = self
        }

        override func onPointerPress(_ x: CGFloat, _ y: CGFloat) {
            super.onPointerPress(x, y)
            guard contentItem != nil else { return }
            scrollView.contentSize = contentItem!.view.layer.bounds.size
            scrollView.delegate = delegate
        }
    }
}

            }
        }

        let scrollView = NeftUIScrollView()

        var contentItem: Item? {
            didSet {
