         size.height = max(minimumSize.height, size.height)
         self.size = size
     }
+    
+    @objc open func setLabel(_ newLabel: String)
+    {
+        label = newLabel
+        
+        _drawAttributes.removeAll()
+        _drawAttributes[NSAttributedStringKey.font] = self.font
+        _drawAttributes[NSAttributedStringKey.paragraphStyle] = _paragraphStyle
+        _drawAttributes[NSAttributedStringKey.foregroundColor] = self.textColor
+        
+        _labelSize = label?.size(withAttributes: _drawAttributes) ?? CGSize.zero
+        
+        var size = CGSize()
+        size.width = _labelSize.width + self.insets.left + self.insets.right
+        size.height = _labelSize.height + self.insets.top + self.insets.bottom
+        size.width = max(minimumSize.width, size.width)
+        size.height = max(minimumSize.height, size.height)
+        self.size = size
+    }
 }

        return super.offsetForDrawing(atPoint: point)
    }
    
    open override func draw(context: CGContext, point: CGPoint)
    {
        guard let label = label else { return }
        
        let offset = self.offsetForDrawing(atPoint: point)
        let size = self.size
        

        
        context.saveGState()
        
        if label.count == 0 {
            context.restoreGState()
            return;
        }
        
        if let color = color
        {
            context.setFillColor(color.cgColor)
            
            let path = UIBezierPath.init(roundedRect: CGRect(x: rect.origin.x, y: rect.origin.y, width: rect.size.width, height: rect.size.height - arrowSize.height), cornerRadius: 5);
            
            let sanJiao = UIBezierPath();
            sanJiao.move(to: CGPoint(
                x: rect.origin.x + (rect.size.width - arrowSize.width) / 2.0,
                y: rect.origin.y + rect.size.height - arrowSize.height))
            sanJiao.addLine(to: CGPoint(
                x: rect.origin.x + rect.size.width / 2.0,
                y: rect.origin.y + rect.size.height))
            sanJiao.addLine(to: CGPoint(
                x: rect.origin.x + (rect.size.width + arrowSize.width) / 2.0,
                y: rect.origin.y + rect.size.height - arrowSize.height))
            path.append(sanJiao)
            path.fill()
        }
        
        rect.origin.y += self.insets.top
