         let operationX:CGFloat = (containViewW - operationW)/2
         
         
-        let operationH:CGFloat = (self.actions.count > 2 || preferredStyle == .popover) ? btnH * CGFloat(self.actions.count) : btnH
+        let operationH:CGFloat = (self.actions.count > 2 || preferredStyle != .alert) ? btnH * CGFloat(self.actions.count) : btnH
         operationView.frame = CGRect(x: operationX, y: operationY, width: operationW, height: operationH)
         
         
-        let btnW:CGFloat = (self.actions.count > 2 || self.actions.count == 1 || preferredStyle == .popover) ? containViewW : (containViewW/2 - 0.25)
+        let btnW:CGFloat = (self.actions.count > 2 || self.actions.count == 1 || preferredStyle != .alert) ? containViewW : (containViewW/2 - 0.25)
         
         
         //布局按钮
         var i:Int = 0
         for btn in self.actiontBtnArray{
-            let btnX:CGFloat = (self.actions.count > 2 || preferredStyle == .popover) ? 0 : (btnW+0.5) * CGFloat(i)
-            let btnY:CGFloat = (self.actions.count > 2 || preferredStyle == .popover) ? (btnH * CGFloat(i)) : 0
+            let btnX:CGFloat = (self.actions.count > 2 || preferredStyle != .alert) ? 0 : (btnW+0.5) * CGFloat(i)
+            let btnY:CGFloat = (self.actions.count > 2 || preferredStyle != .alert) ? (btnH * CGFloat(i)) : 0
             
             if (messageLabel.isHidden && titleLabel.isHidden) && i == 0 && self.preferredStyle ==  .actionSheet {
                 btn.lineView.isHidden = true

        for action in self.actions{
            let actionBtn:JWActionButton = JWActionButton()
            actionBtn.tag  = self.actiontBtnArray.count
            actionBtn.lineView.isHidden = self.actions.count <= 2
            
            
            actionBtn.titleLabel?.font = UIFont.systemFont(ofSize: 14)

            if preferredStyle == .popover{
                actionBtn.lineMargin = 10
                actionBtn.lineView.isHidden = self.actiontBtnArray.count < 1
                actionBtn.setBackgroundImage(UIImage(named:"normalBlackBg"), for: UIControlState.normal)
                actionBtn.setBackgroundImage(UIImage(named:"normalBlackBg"), for: UIControlState.highlighted)
                actionBtn.setTitleColor(UIColor.white, for: UIControlState.normal)
                actionBtn.setTitleColor(UIColor.white, for: UIControlState.highlighted)
            }else{
                
                actionBtn.setBackgroundImage(UIImage(named:"normalBg"), for: UIControlState.normal)
                actionBtn.setBackgroundImage(UIImage(named:"highlightBg"), for: UIControlState.highlighted)
                
                switch action.actionStyle {
                case .cancel:
