     open override func didMoveToSuperview() {
         super.didMoveToSuperview()
         superview?.addObserver(self, forKeyPath: "frame", options: [], context: nil)
+        superview?.addObserver(self, forKeyPath: "bounds", options: [], context: nil)
         if sticky == true {
             if let superviews = self.getAllSuperviews() {
                 for superview in superviews {

    }

    open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
        if (object as? UIView) == superview && keyPath == "frame" {
            if isCustomFrame == false {
                setRightBottomFrame()
                setOverlayFrame()


    open override func willMove(toSuperview newSuperview: UIView?) {
        superview?.removeObserver(self, forKeyPath: "frame")
        superview?.removeObserver(self, forKeyPath: "bounds")
        if sticky == true {
            if let superviews = self.getAllSuperviews() {
                for superview in superviews {
