                     newHeight = max(newHeight, MoView.minHeight)
                 }
                 // bottom
-                if (newY + newHeight > superviewBoundHeight() &&
+                if (newY + newHeight > superviewContentHeight() &&
                     self.frame.size.height != newHeight) {
-                    newHeight = superviewBoundHeight() - newY;
+                    newHeight = superviewContentHeight() - newY;
                     newHeight = max(newHeight, MoView.minHeight)
                 }
             }

                if touchPoint.x < border {
                    touchPoint.x = border
                }
                if touchPoint.x > superviewBoundWidth() - border {
                    touchPoint.x = superviewBoundWidth() - border
                }
                if touchPoint.y < border {
                    touchPoint.y = border
                }
                if touchPoint.y > superviewBoundHeight() - border {
                    touchPoint.y = superviewBoundHeight() - border
                }
            }
            

                    newWidth = max(newWidth, MoView.minWidth)
                }
                // right
                if (newX + newWidth > superX + superviewContentWidth() &&
                    self.frame.size.width != newWidth) {
                    newWidth = superviewContentWidth() - newX;
                    newWidth = max(newWidth, MoView.minWidth)
                }
                // top
