             objc_setAssociatedObject(self, &tooltipViewKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
         }
     }
-    
-    public func setTooltip(_ tooltipView:ZGTooltipView) {
+
+    public var tooltipDisplayView: UIView? {
+        get {
+            return objc_getAssociatedObject(self, &tooltipDisplayViewKey) as? UIView
+        }
+        set(newValue) {
+            objc_setAssociatedObject(self, &tooltipDisplayViewKey, newValue, objc_AssociationPolicy.OBJC_ASSOCIATION_RETAIN)
+        }
+    }
+    
+    public func setTooltip(_ tooltipView:ZGTooltipView, displayInView displayView: UIView? = nil) {
         self.tooltipView = tooltipView
+        self.tooltipDisplayView = displayView
         
         tooltipTapGesture = UITapGestureRecognizer(target: self, action: #selector(UIView.tooltipGestureHandler(_:)))
         self.addGestureRecognizer(tooltipTapGesture!)

        self.setNeedsLayout()
        self.layoutIfNeeded()
        
        switch self.direction {
            
        case .bottom, .bottomLeft, .bottomRight:
            superview.addConstraint(NSLayoutConstraint(item: self, attribute: .top, relatedBy: .equal, toItem: superview, attribute: .bottom, multiplier: 1, constant:  triangleSpacing - (self.bounds.height / 2) ))
            break
            
        case .top, .topRight, .topLeft:
            superview.addConstraint(NSLayoutConstraint(item: self, attribute: .bottom, relatedBy: .equal, toItem: superview, attribute: .top, multiplier: 1, constant:  (triangleSpacing - (self.bounds.height / 2)) * -1))
            break
            
        case .left, .right:
            superview.addConstraint(NSLayoutConstraint(item: superview, attribute: .centerY, relatedBy: .equal, toItem: self, attribute: .centerY, multiplier: 1, constant:  0))
            break
        }
        
        switch self.direction {
        case .left:
            superview.addConstraint(NSLayoutConstraint(item: self, attribute: .right, relatedBy: .equal, toItem: superview, attribute: .left, multiplier: 1, constant: (triangleSpacing - (self.bounds.width / 2)) * -1))
            break
        case .bottomRight, .topRight:
            self.superview?.addConstraint(NSLayoutConstraint(item: superview, attribute: .right, relatedBy: .equal, toItem: self, attribute: .right, multiplier: 1, constant:  ((self.bounds.width / 2)) * -1))
            break
        case .bottomLeft, .topLeft:
            self.superview?.addConstraint(NSLayoutConstraint(item: superview, attribute: .left, relatedBy: .equal, toItem: self, attribute: .left, multiplier: 1, constant:  ((self.bounds.width / 2))))
            break
        case .right:
            superview.addConstraint(NSLayoutConstraint(item: self, attribute: .left, relatedBy: .equal, toItem: superview, attribute: .right, multiplier: 1, constant:  triangleSpacing - (self.bounds.width / 2) ))
            break
        case .top, .bottom:
            self.superview?.addConstraint(NSLayoutConstraint(item: superview, attribute: .centerX, relatedBy: .equal, toItem: self, attribute: .centerX, multiplier: 1, constant:  0))
            break
        }
        
        if (animationEnable) {
            

    }
    
    
    fileprivate func displayInView(_ superview:UIView, origin: UIView) {

        superview.addSubview(self)

        self.layoutMargins = UIEdgeInsetsMake(8, 13, 8, 13)
        self.layer.cornerRadius = 4
        
        triangleShapeLayer?.removeFromSuperlayer()
        
