浏览代码

【toolbar】自定义视图点击无响应修复

tangchao 1 年之前
父节点
当前提交
4a23bca302
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarItemView.swift

+ 3 - 2
PDF Office/PDF Master/Class/PDFWindowController/Toolbar/KMToolbarItemView.swift

@@ -414,10 +414,11 @@ extension KMToolbarItemView {
             
             self.customizeView?.mas_makeConstraints({ make in
                 make?.left.right().equalTo()(0)
-                make?.centerY.mas_equalTo()(0)
+                make?.centerY.equalTo()(0)
                 make?.width.offset()(self.customizeView!.frame.size.width)
                 make?.height.offset()(self.customizeView!.frame.size.height)
             })
+            return
         }
         if self.boxImagePosition == .imageOnly && self.itemIdentifier != KMToolbarDividerItemIdentifier {
             self.addSubview(self.imageViewBox)
@@ -471,7 +472,7 @@ extension KMToolbarItemView {
         } else if (self.boxImagePosition == .imageExpandLeft) {
             self.addSubview(self.imageViewBox)
             self.imageViewBox.mas_makeConstraints { make in
-                make?.left.right().top().bottom().equalTo()(0)
+                make?.left.top().bottom().equalTo()(0)
             }
 
             self.imageViewBox.contentView?.addSubview(self.imageViewBtn)