     case .up:
       frame.origin.y = self.arrowShowPoint.y - frame.height - self.arrowSize.height
       anchorPoint = CGPoint(x: arrowPoint.x / frame.size.width, y: 1)
-    case .down:
+    case .down, .auto:
       frame.origin.y = self.arrowShowPoint.y
       anchorPoint = CGPoint(x: arrowPoint.x / frame.size.width, y: 0)
     }

        )
      )

    case .down:
      arrow.move(to: CGPoint(x: arrowPoint.x, y: 0))
      arrow.addLine(
        to: CGPoint(


  open func show(_ contentView: UIView, fromView: UIView, inView: UIView) {
    let point: CGPoint
    
    if self.popoverType == .auto {
        if let point = fromView.superview?.convert(fromView.frame.origin, to: nil), point.y + contentView.frame.height + 75 > inView.frame.height {
            self.popoverType = .up
        } else {
            self.popoverType = .down
        }
    }
    
    switch self.popoverType {
    case .up:
      point = inView.convert(
