Browse Source

[批量操作] - 转档UI

jiajie 1 year ago
parent
commit
714cd72b9c

+ 14 - 14
PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.swift

@@ -33,24 +33,24 @@ class KMConvertCollectionViewHeader: KMBaseXibView{
     override func awakeFromNib() {
         super.awakeFromNib()
 
-//        containerView.wantsLayer = true
+        containerView.wantsLayer = true
 //        containerView.layer?.cornerRadius = 12
-        //        if IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice {
-        //            containerView.isHidden = true
-        //        }
-        //购买状态变化通知
-//        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: KMIAPProductPurchasedNotification), object: nil)
-//        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: KMIAPProductRestoreFinishedNotification), object: nil)
+//                if IAPProductsManager.defaultManager().isAvailableAdvancedPDFToOffice {
+//                    containerView.isHidden = true
+//                }
+//        购买状态变化通知
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: "KMIAPProductPurchasedNotification"), object: nil)
+        NotificationCenter.default.addObserver(self, selector: #selector(IAPProductRestoreFinishedNotification(notification:)), name: NSNotification.Name(rawValue: "KMIAPProductRestoreFinishedNotification"), object: nil)
     }
     
     override func setup() {
-//        indicateLabel.font = NSFont.boldSystemFont(ofSize: 14)
-//        indicateLabel.textColor = KMAppearance.Layout.h0Color()
-//        indicateLabel.stringValue = NSLocalizedString("Convert", comment: "")
-//        infoLabel.font = NSFont.boldSystemFont(ofSize: 11)
-//        infoLabel.textColor = KMAppearance.Interactive.m0Color()
-//        infoLabel.stringValue = NSLocalizedString("Upgrade to Pro", comment: "")
-//        infoLabel.toolTip = NSLocalizedString("Upgrade to Pro", comment: "")
+        indicateLabel.font = NSFont.boldSystemFont(ofSize: 14)
+        indicateLabel.textColor = KMAppearance.Layout.h0Color()
+        indicateLabel.stringValue = NSLocalizedString("Convert", comment: "")
+        infoLabel.font = NSFont.boldSystemFont(ofSize: 11)
+        infoLabel.textColor = KMAppearance.Interactive.m0Color()
+        infoLabel.stringValue = NSLocalizedString("Upgrade to Pro", comment: "")
+        infoLabel.toolTip = NSLocalizedString("Upgrade to Pro", comment: "")
     }
     
     override func mouseUp(with event: NSEvent) {

+ 8 - 7
PDF Office/PDF Master/Class/Batch/View/KMConvertCollectionViewHeader.xib

@@ -6,7 +6,14 @@
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMConvertCollectionViewHeader" customModule="PDF_Master" customModuleProvider="target"/>
+        <customObject id="-2" userLabel="File's Owner" customClass="KMConvertCollectionViewHeader" customModule="PDF_Master" customModuleProvider="target">
+            <connections>
+                <outlet property="containerView" destination="65M-xr-NTJ" id="CbO-vk-fBP"/>
+                <outlet property="imageView" destination="JZM-NO-k0s" id="hEv-AK-w8s"/>
+                <outlet property="indicateLabel" destination="adF-Xf-x0M" id="KPt-Mj-Snn"/>
+                <outlet property="infoLabel" destination="Sft-Vr-raz" id="goo-JB-Rex"/>
+            </connections>
+        </customObject>
         <customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
         <customObject id="-3" userLabel="Application" customClass="NSObject"/>
         <customView identifier="convertHeader" id="c22-O7-iKe">
@@ -66,12 +73,6 @@
                 <constraint firstItem="adF-Xf-x0M" firstAttribute="top" secondItem="c22-O7-iKe" secondAttribute="top" constant="15" id="Ptb-I5-jdh"/>
                 <constraint firstItem="65M-xr-NTJ" firstAttribute="leading" secondItem="adF-Xf-x0M" secondAttribute="trailing" constant="10" id="vGf-Mc-fJj"/>
             </constraints>
-            <connections>
-                <outlet property="containerView" destination="65M-xr-NTJ" id="6NC-g9-Wuq"/>
-                <outlet property="imageView" destination="JZM-NO-k0s" id="v6i-GT-ZOt"/>
-                <outlet property="indicateLabel" destination="adF-Xf-x0M" id="cAv-ur-r5G"/>
-                <outlet property="infoLabel" destination="Sft-Vr-raz" id="BG0-Ai-hlY"/>
-            </connections>
             <point key="canvasLocation" x="-134" y="121"/>
         </customView>
     </objects>