         case .bottom:
             // 图片和文字上下排版时，宽度以文字或图片的最大宽度为最终宽度
             let imageLimitWidth = contentLimitSize.width - imageEdgeInsets.horizontalValue
-            let imageSize = imageView?.sizeThatFits(CGSize(width: imageLimitWidth, height: CGFloat.greatestFiniteMagnitude))// 假设图片高度必定完整显示
-            
+            let imageSize = imageView?.sizeThatFits(CGSize(width: imageLimitWidth, height: CGFloat.greatestFiniteMagnitude)) // 假设图片高度必定完整显示
+
             let titleLimitSize = CGSize(width: contentLimitSize.width - titleEdgeInsets.horizontalValue, height: contentLimitSize.height - imageEdgeInsets.verticalValue - (imageSize?.height ?? 0) - titleEdgeInsets.verticalValue)
             var titleSize = titleLabel?.sizeThatFits(titleLimitSize)
             titleSize?.height = CGFloat(fminf(Float(titleSize?.height ?? 0), Float(titleLimitSize.height)))
-            
+
             resultSize.width = contentEdgeInsets.horizontalValue
             resultSize.width += CGFloat(fmaxf(Float(imageEdgeInsets.horizontalValue) + Float(imageSize?.width ?? 0), Float(titleEdgeInsets.horizontalValue) + Float(titleSize?.width ?? 0)))
             resultSize.height = contentEdgeInsets.verticalValue + imageEdgeInsets.verticalValue + (imageSize?.height ?? 0) + titleEdgeInsets.verticalValue + (titleSize?.height ?? 0)
-            
+
         case .left:
             fallthrough
         case .right:
             if imagePosition == .left && titleLabel?.numberOfLines == 1 {
-                
+
                 // QMUIButtonImagePositionLeft使用系统默认布局
                 resultSize = super.sizeThatFits(size)
-                
+
             } else {
                 // 图片和文字水平排版时，高度以文字或图片的最大高度为最终高度
                 // titleLabel为多行时，系统的sizeThatFits计算结果依然为单行的，所以当QMUIButtonImagePositionLeft并且titleLabel多行的情况下，使用自己计算的结果
-                
+
                 let imageLimitHeight = contentLimitSize.height - imageEdgeInsets.verticalValue
-                let imageSize = imageView?.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: imageLimitHeight))// 假设图片宽度必定完整显示，高度不超过按钮内容
-                
+                let imageSize = imageView?.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: imageLimitHeight)) // 假设图片宽度必定完整显示，高度不超过按钮内容
+
                 let titleLimitSize = CGSize(width: contentLimitSize.width - titleEdgeInsets.horizontalValue - (imageSize?.width ?? 0) - imageEdgeInsets.horizontalValue, height: contentLimitSize.height - titleEdgeInsets.verticalValue)
                 var titleSize = titleLabel?.sizeThatFits(titleLimitSize)
                 titleSize?.height = CGFloat(fminf(Float(titleSize?.height ?? 0), Float(titleLimitSize.height)))
-                
+
                 resultSize.width = contentEdgeInsets.horizontalValue + imageEdgeInsets.horizontalValue + (imageSize?.width ?? 0) + titleEdgeInsets.horizontalValue + (titleSize?.width ?? 0)
                 resultSize.height = contentEdgeInsets.verticalValue
                 resultSize.height += CGFloat(fmaxf(Float(imageEdgeInsets.verticalValue) + Float(imageSize?.height ?? 0), Float(titleEdgeInsets.verticalValue) + Float(titleSize?.height ?? 0)))

     *
     *  @note tintColor、position、target、Selector? 等参数不需要对 QMUINavigationButton 设置，通过参数传进来就可以了，就算设置了也会在这个方法里被覆盖。
     */
    class func barButtonItem(with navigationButton: QMUINavigationButton, tintColor: UIColor, position: QMUINavigationButtonPosition, target: Any?, action: Selector?) -> UIBarButtonItem {
        fatalError()
    }
    
    /**
     *  将参数传进来的 button 作为 customView 用于生成一个 UIBarButtonItem。
     *  @param button 要作为 customView 的 QMUINavigationButton

                    titleFrame = titleFrame.setY(contentEdgeInsets.top + titleEdgeInsets.top)
                    titleFrame = titleFrame.setHeight(imageFrame.minY - imageEdgeInsets.top - titleEdgeInsets.bottom - titleFrame.minY)
                }
            }

            imageView?.frame = imageFrame.flatted
            titleLabel?.frame = titleFrame.flatted

        } else if imagePosition == .right {
            let imageLimitHeight = contentSize.height - imageEdgeInsets.verticalValue
            let imageSize = imageView?.sizeThatFits(CGSize(width: CGFloat.greatestFiniteMagnitude, height: imageLimitHeight)) ?? .zero // 假设图片宽度必定完整显示，高度不超过按钮内容
            var imageFrame = imageSize.rect

            let titleLimitSize = CGSize(width: contentSize.width - titleEdgeInsets.horizontalValue - imageFrame.width - imageEdgeInsets.horizontalValue, height: contentSize.height - titleEdgeInsets.verticalValue)
