         }
     }
 
-    open override func didMoveToWindow() {
-        super.didMoveToWindow()
+    open override func didMoveToSuperview() {
+        super.didMoveToSuperview()
 
         initializeView()
     }

        get { return drawingView.intrinsicContentSize }
    }

    #if os(OSX)
    open override var layer: CALayer? {
        didSet {

            }
            initializeView()

            renderer = RenderUtils.createNodeRenderer(node, view: drawingView)
        }
    }
    #endif
