فهرست منبع

【页面分割】功能调式

tangchao 1 سال پیش
والد
کامیت
01064276bc

+ 1 - 2
PDF Office/PDF Master/Class/PDFWindowController/Side/RightSide/AnnotationProperty/ViewController/PageDisplay/KMPageDisplayPropertiesViewController.swift

@@ -543,8 +543,7 @@ class KMPageDisplayPropertiesButton: NSButton {
             break
         }
         
-//        mainController.toggleSplitPDF(menuItem)
-        
+        self.mainController?.toggleSplitPDF(menuItem)
         
         if !replaceView.isHidden {
             reloadReplaceView()

+ 113 - 22
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+Action.swift

@@ -1402,16 +1402,16 @@ extension KMMainViewController {
     
     func splitView(withTag tag: Int) {
         if tag == 0 {
-            listView.viewSplitMode = KMPDFViewSplitMode.horizontal
-            singlePageScreen(isSinglePage: false, doublePagesScreen: false)
+            self.listView.viewSplitMode = KMPDFViewSplitMode.horizontal
+            self.singlePageScreen(isSinglePage: false, doublePagesScreen: false)
         } else if tag == 1 {
-            listView.viewSplitMode = KMPDFViewSplitMode.vertical
-            singlePageScreen(isSinglePage: false, doublePagesScreen: true)
+            self.listView.viewSplitMode = KMPDFViewSplitMode.vertical
+            self.singlePageScreen(isSinglePage: false, doublePagesScreen: true)
         } else if tag == 2 {
-            listView.viewSplitMode = KMPDFViewSplitMode.disable
-            singlePageScreen(isSinglePage: true, doublePagesScreen: false)
+            self.listView.viewSplitMode = KMPDFViewSplitMode.disable
+            self.singlePageScreen(isSinglePage: true, doublePagesScreen: false)
         }
-        listView.needsDisplay = true
+        self.listView.needsDisplay = true
     }
     
     // MARK: Redact 【密文标记】
@@ -2818,27 +2818,118 @@ extension KMMainViewController {
         if isSinglePage {
             pdfSplitView.dividerStyle = .thin
 
-            pdfSplitView.setPosition(mianSplitView.maxPossiblePositionOfDivider(at: 1), ofDividerAt: 0, animate: true)
+            pdfSplitView.setPosition(mianSplitView.maxPossiblePositionOfDivider(at: 1), ofDividerAt: 0, animate: false)
         } else {
-            pdfSplitView.dividerStyle = .paneSplitter
-            pdfSplitView.isVertical = !isHorizontal
-            
-            pdfSplitView.setPosition(500, ofDividerAt: 0, animate: true)
-            
-            if secondaryPdfView.document != nil {
-//                secondaryPdfView.frame = pdfSplitSecondView.frame
-//                pdfSplitSecondView.contentView = secondaryPdfView
-            } else {
-                openSecondaryPdfView = KMSecondaryViewController.init()
-                openSecondaryPdfView?.view.frame = pdfSplitSecondView.frame
-                pdfSplitSecondView.contentView = openSecondaryPdfView?.view
-                openSecondaryPdfView?.delegate = self
+//            pdfSplitView.dividerStyle = .paneSplitter
+//            pdfSplitView.isVertical = !isHorizontal
+//
+//            pdfSplitView.setPosition(500, ofDividerAt: 0, animate: true)
+//
+//            if secondaryPdfView.document != nil {
+////                secondaryPdfView.frame = pdfSplitSecondView.frame
+////                pdfSplitSecondView.contentView = secondaryPdfView
+//            } else {
+//                openSecondaryPdfView = KMSecondaryViewController.init()
+//                openSecondaryPdfView?.view.frame = pdfSplitSecondView.bounds
+//                pdfSplitSecondView.contentView = openSecondaryPdfView?.view
+//                openSecondaryPdfView?.delegate = self
+//            }
+            if self.newPDFSplitView.animating {
+                return
+            }
+            self.newPDFSplitView.isVertical = isHorizontal
+            if self.secondaryPdfView.window == nil {
+                let frame = self.newPDFSplitView.bounds
+
+                if (self.lastSplitPDFHeight <= 0.0) {
+                    var DEFAULT_SPLIT_PDF_FACTOR: Float = 0.3
+                    self.lastSplitPDFHeight = floorf(DEFAULT_SPLIT_PDF_FACTOR * self.lastSplitPDFHeightFloat(frame))
+                }
+                
+                var position = self.lastSplitPDFHeightFloat(frame)-self.lastSplitPDFHeight-Float(self.newPDFSplitView.dividerThickness)
+                var point: NSPoint = .zero
+//                PDFPage *page = nil;
+                self.newPDFSplitView.setPosition(position.cgFloat, ofDividerAt: 0, animate: false)
+//
+                if (self.secondaryPdfContentView == nil) {
+//                    secondaryPdfContentView = [[SKGradientView alloc] initWithFrame:NSMakeRect(0.0, 0.0, 200.0, 20.0)];
+                    self.secondaryPdfContentView = NSView(frame: NSMakeRect(0, 0, 200, 20))
+//                    secondaryPdfView = [[SKSecondaryPDFView alloc] initWithFrame:[secondaryPdfContentView bounds]];
+                    self.secondaryPdfView = CPDFView(frame: self.secondaryPdfContentView?.bounds ?? .zero)
+                    self.secondaryPdfView.autoresizingMask = [.width, .height]
+//                    self.secondaryPdfContentView?.isHidden = true
+                    self.secondaryPdfContentView?.addSubview(self.secondaryPdfView)
+                    self.newPDFSplitView.addSubview(self.secondaryPdfContentView!)
+//                    // Because of a PDFView bug, display properties can not be changed before it is placed in a window
+//                    [secondaryPdfView setSynchronizedPDFView:pdfView];
+                    self.secondaryPdfView.backgroundColor = self.listView.backgroundColor
+//                    [secondaryPdfView applyDefaultPageBackgroundColor];
+                    self.secondaryPdfView.displaysPageBreaks = false
+                    self.secondaryPdfView.setShouldAntiAlias(KMPreference.shared.antiAliasText)
+                    self.secondaryPdfView.applyDefaultInterpolationQuality()
+                    self.secondaryPdfView.setGreekingThreshold(KMPreference.shared.greekThreshold.cgFloat)
+//                    [secondaryPdfView setSynchronizeZoom:YES];
+//        //            [secondaryPdfView setDocument:[pdfView document]];
+                    point = NSMakePoint(NSMinX(frame), NSMaxY(frame) - position.cgFloat - self.newPDFSplitView.dividerThickness)
+//                    page = [pdfView pageForPoint:point nearest:YES];
+//
+//                    NSView *controlView = [secondaryPdfView controlView];
+//                    NSColor *color = [NSColor colorWithCalibratedWhite:0.97 alpha:1.0];
+//                    if([KMAppearance isDarkMode]) {
+//                        color = [KMAppearance KMColor_Layout_L0];
+//                    }
+//                    [(SKGradientView *)secondaryPdfContentView setGradient:[[[NSGradient alloc] initWithStartingColor:color endingColor:color] autorelease]];
+//                    [(SKGradientView *)secondaryPdfContentView setAlternateGradient:nil];
+//                    NSRect pdfRect, controlRect;
+//                    NSDivideRect([secondaryPdfContentView bounds], &controlRect, &pdfRect, NSHeight([controlView frame]), NSMinYEdge);
+//                    controlRect.size.width = NSWidth([controlView frame]);
+//                    [controlView setFrame:controlRect];
+//                    [controlView setAutoresizingMask:NSViewMaxXMargin | NSViewMaxYMargin | NSViewWidthSizable];
+//                    [(SKGradientView *)secondaryPdfContentView setMinSize:controlRect.size];
+//                    [secondaryPdfView setFrame:pdfRect];
+                    self.secondaryPdfView.frame = NSMakeRect(0, 0, 400, 400)
+//                    [secondaryPdfContentView addSubview:controlView];
+//
+                    self.openSecondaryPdfView = KMSecondaryViewController()
+                    self.openSecondaryPdfView?.view.frame = self.secondaryPdfContentView?.frame ?? .zero
+//                    [secondaryPdfContentView addSubview:openSecondaryPdfView.view];
+                    self.secondaryPdfContentView?.addSubview(self.openSecondaryPdfView!.view)
+//                    __block typeof(self)weakself = self;
+//                    openSecondaryPdfView.secondaryView.receivedFileUrlBlock = ^(NSURL *fileUrl) {
+//                        [weakself displaySecondaryPDFViewWithUrl:fileUrl];
+//                        [openSecondaryPdfView.view removeFromSuperview];
+//                    };
+                    if (!isHorizontal) {
+                        self.openSecondaryPdfView?.changeBenefit(ofContrastLabelWidth: 300)
+                    }
+                } else {
+                    self.secondaryPdfContentView?.isHidden = true
+                    self.newPDFSplitView.addSubview(self.secondaryPdfContentView!)
+                }
+                
+//                self.newPDFSplitView.setPosition(position.cgFloat, ofDividerAt: 0, animate: true)
+//
+//                if (page) {
+//                    [secondaryPdfView goToPage:page];
+//                    point = [secondaryPdfView convertPoint:[secondaryPdfView convertPoint:[pdfView convertPoint:point toPage:page] fromPage:page] toView:[secondaryPdfView documentView]];
+//                    if ([[[secondaryPdfView scrollView] contentView] isFlipped] == NO)
+//                        point.y -= [[secondaryPdfView documentView] isFlipped] ? -NSHeight([[secondaryPdfView documentView] visibleRect]) : NSHeight([[secondaryPdfView documentView] visibleRect]);
+//                    [[secondaryPdfView documentView] scrollPoint:point];
+//                    [secondaryPdfView layoutDocumentView];
+//                }
             }
+//            [[self window] recalculateKeyViewLoop];
+//            if ([self interactionMode] == SKLegacyFullScreenMode)
+//                [[self window] makeFirstResponder:pdfView];
+//
+//            if (![self.secondaryPdfView document]) {
+//                [openSecondaryPdfView viewHighlyAdaptive];
+//            }
         }
     }
     
     func lastSplitPDFHeightFloat(_ rect: NSRect) -> Float {
-        if (pdfSplitView.isVertical) {
+        if (self.newPDFSplitView.isVertical) {
             return Float(NSWidth(rect))
         } else {
             return Float(NSHeight(rect))

+ 33 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift

@@ -279,12 +279,33 @@ extension KMMainViewController: KMToolbarControllerDelegate {
 extension KMMainViewController : NSSplitViewDelegate {
     func splitView(_ splitView: NSSplitView, canCollapseSubview subview: NSView) -> Bool {
         if splitView == self.mianSplitView {
-//            return (subview == self.listView) == false
+            //            return (subview == self.listView) == false
+        } else if splitView == self.newPDFSplitView {
+            return subview.isEqual(to: self.secondaryPdfContentView)
         }
         return false
     }
     
     func splitView(_ splitView: NSSplitView, shouldCollapseSubview subview: NSView, forDoubleClickOnDividerAt dividerIndex: Int) -> Bool {
+        if splitView == self.newPDFSplitView {
+            if subview.isEqual(to: self.secondaryPdfContentView) {
+                var position = self.newPDFSplitView.maxPossiblePositionOfDivider(at: dividerIndex)
+                if self.newPDFSplitView.isSubviewCollapsed(subview) {
+                    if self.lastSplitPDFHeight <= 0.0 {
+                        let DEFAULT_SPLIT_PANE_HEIGHT: Float = 200.0
+                        self.lastSplitPDFHeight = DEFAULT_SPLIT_PANE_HEIGHT
+                    }
+                    if self.lastSplitPDFHeight.cgFloat > NSHeight(self.pdfContentView.frame) {
+                        self.lastSplitPDFHeight = floorf(0.5 * Float(NSHeight(self.pdfContentView.frame)))
+                    }
+                    position += self.lastSplitPDFHeight.cgFloat
+                } else {
+                    self.lastSplitPDFHeight = Float(NSHeight(subview.frame))
+                }
+                self.pdfSplitView.setPosition(position, ofDividerAt: dividerIndex, animate: true)
+            }
+            return false
+        }
         return false
     }
     
@@ -305,6 +326,11 @@ extension KMMainViewController : NSSplitViewDelegate {
             } else if dividerIndex == 1 {
                 return splitViewWidth
             }
+        } else if splitView == self.newPDFSplitView {
+            if dividerIndex == 0 {
+                let MIN_SIDE_PANE_WIDTH = 270
+                return proposedMaximumPosition + MIN_SIDE_PANE_WIDTH.cgFloat
+            }
         }
         return proposedMaximumPosition
     }
@@ -327,8 +353,12 @@ extension KMMainViewController : NSSplitViewDelegate {
             let leftView = splitView.subviews[0]
             let centerView = splitView.subviews[1]
             let rightView = splitView.subviews[2]
+//            let centerView = self.pdfSplitView ?? splitView.subviews[1]
+//            let rightView = self.rightView ?? splitView.subviews[2]
             
+            // 左边是否收起
             let leftCollapsed = splitView.isSubviewCollapsed(leftView)
+            // 右边是否收起
             let rightCollapsed = splitView.isSubviewCollapsed(rightView)
             var leftSize = leftView.frame.size
             var mainSize = centerView.frame.size
@@ -367,6 +397,8 @@ extension KMMainViewController : NSSplitViewDelegate {
                 rightView.setFrameSize(rightSize)
             }
             centerView.setFrameSize(mainSize)
+        } else if splitView == self.newPDFSplitView {
+            KMPrint("")
         }
         splitView.adjustSubviews()
     }

+ 4 - 1
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.swift

@@ -34,6 +34,7 @@ let LOCKED_KEY  = "locked"
     @IBOutlet weak var leftView: NSView!
     @IBOutlet weak var mianSplitView: KMSplitView!
     @IBOutlet weak var pdfSplitView: KMSplitView!
+    @IBOutlet weak var newPDFSplitView: KMSplitView!
     @IBOutlet weak var pdfContentView: NSView!
     @IBOutlet weak var pdfSplitSecondView: NSBox!
     
@@ -142,7 +143,7 @@ let LOCKED_KEY  = "locked"
     
     var openSecondaryPdfView: KMSecondaryViewController?
     var secondaryPdfContentView: NSView?
-    var lastSplitPDFHeight: Float?
+    var lastSplitPDFHeight: Float = 0.0
     internal var isSaveKeyChain = true
     
     var rightMouseEventing = false
@@ -233,6 +234,8 @@ let LOCKED_KEY  = "locked"
         self.initPDFLeftViewVC()
         self.initRightSideView()
         self.toolbarController.listView = self.listView
+        
+        self.newPDFSplitView.delegate = self
     }
     
     override func viewDidAppear() {

+ 67 - 57
PDF Office/PDF Master/Class/PDFWindowController/ViewController/KMMainViewController.xib

@@ -1,12 +1,12 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="22155" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
+<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
     <dependencies>
         <deployment identifier="macosx"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="22155"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
-        <customObject id="-2" userLabel="File's Owner" customClass="KMMainViewController" customModule="PDF_Master" customModuleProvider="target">
+        <customObject id="-2" userLabel="File's Owner" customClass="KMMainViewController" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <connections>
                 <outlet property="PDFContendView" destination="yMu-ou-GV9" id="diy-Q0-PHp"/>
                 <outlet property="bottomAreaView" destination="z7q-Gv-vF1" id="7WI-Yd-Ayi"/>
@@ -17,6 +17,7 @@
                 <outlet property="listView" destination="Cdz-fv-u4h" id="BLf-Jo-GG8"/>
                 <outlet property="locationPageView" destination="lNB-M6-fxu" id="HMk-jd-IjS"/>
                 <outlet property="mianSplitView" destination="uhq-Ou-HaH" id="BSo-qg-XXn"/>
+                <outlet property="newPDFSplitView" destination="a9b-Kr-AhZ" id="cLe-3Y-lF3"/>
                 <outlet property="pageNumberDisplayView" destination="WjC-fF-x99" id="TH2-oe-F6s"/>
                 <outlet property="pdfContentView" destination="2Kn-qX-BRm" id="K5Y-gR-sT6"/>
                 <outlet property="pdfSplitSecondView" destination="Zhm-9e-eFs" id="I1I-R1-1We"/>
@@ -43,6 +44,10 @@
             <subviews>
                 <button verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Qt3-H1-Txz">
                     <rect key="frame" x="667" y="347" width="1" height="1"/>
+                    <constraints>
+                        <constraint firstAttribute="height" constant="0.10000000000000001" id="3Ah-UW-M3a"/>
+                        <constraint firstAttribute="width" constant="0.10000000000000001" id="Iz6-2Y-Kn5"/>
+                    </constraints>
                     <buttonCell key="cell" type="bevel" bezelStyle="rounded" alignment="center" imageScaling="proportionallyDown" inset="2" id="RgE-Pm-Sre">
                         <behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
                         <font key="font" metaFont="system"/>
@@ -50,10 +55,6 @@
 Gw
 </string>
                     </buttonCell>
-                    <constraints>
-                        <constraint firstAttribute="height" constant="0.10000000000000001" id="3Ah-UW-M3a"/>
-                        <constraint firstAttribute="width" constant="0.10000000000000001" id="Iz6-2Y-Kn5"/>
-                    </constraints>
                     <connections>
                         <action selector="exitFullScreen:" target="-2" id="eVN-b0-2s4"/>
                     </connections>
@@ -61,63 +62,72 @@ Gw
                 <customView translatesAutoresizingMaskIntoConstraints="NO" id="yMu-ou-GV9">
                     <rect key="frame" x="0.0" y="0.0" width="1335" height="578"/>
                     <subviews>
-                        <splitView arrangesAllSubviews="NO" dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uhq-Ou-HaH" customClass="KMSplitView" customModule="PDF_Master" customModuleProvider="target">
+                        <splitView arrangesAllSubviews="NO" dividerStyle="thin" vertical="YES" translatesAutoresizingMaskIntoConstraints="NO" id="uhq-Ou-HaH" customClass="KMSplitView" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="1335" height="578"/>
                             <subviews>
                                 <customView fixedFrame="YES" id="vrW-lc-OvI">
-                                    <rect key="frame" x="0.0" y="0.0" width="77" height="578"/>
+                                    <rect key="frame" x="0.0" y="0.0" width="207" height="578"/>
                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 </customView>
-                                <customView id="Qs2-A4-zLE">
-                                    <rect key="frame" x="78" y="0.0" width="1000" height="578"/>
+                                <splitView fixedFrame="YES" arrangesAllSubviews="NO" dividerStyle="paneSplitter" vertical="YES" id="a9b-Kr-AhZ" customClass="KMSplitView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                    <rect key="frame" x="208" y="0.0" width="849" height="578"/>
                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                     <subviews>
-                                        <customView translatesAutoresizingMaskIntoConstraints="NO" id="Cdz-fv-u4h" customClass="CPDFListView">
-                                            <rect key="frame" x="0.0" y="0.0" width="1000" height="578"/>
-                                        </customView>
-                                        <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3E1-9V-2lu" customClass="KMReadModelView" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="300" y="16" width="400" height="32"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="400" id="8go-j7-y2w"/>
-                                                <constraint firstAttribute="height" constant="32" id="Opl-4j-wTU"/>
-                                            </constraints>
-                                        </customView>
-                                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zKE-Pq-I7d" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
-                                            <rect key="frame" x="16" y="16" width="82" height="36"/>
-                                            <view key="contentView" id="cbK-wK-42I">
-                                                <rect key="frame" x="0.0" y="0.0" width="82" height="36"/>
-                                                <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-                                                <subviews>
-                                                    <customView translatesAutoresizingMaskIntoConstraints="NO" id="WjC-fF-x99" customClass="KMPageNumberDisplayView" customModule="PDF_Master" customModuleProvider="target">
+                                        <customView misplaced="YES" id="Qs2-A4-zLE">
+                                            <rect key="frame" x="0.0" y="0.0" width="849" height="578"/>
+                                            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
+                                            <subviews>
+                                                <customView translatesAutoresizingMaskIntoConstraints="NO" id="Cdz-fv-u4h" customClass="CPDFListView">
+                                                    <rect key="frame" x="0.0" y="0.0" width="0.0" height="578"/>
+                                                </customView>
+                                                <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="3E1-9V-2lu" customClass="KMReadModelView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                                    <rect key="frame" x="-200" y="16" width="400" height="32"/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="400" id="8go-j7-y2w"/>
+                                                        <constraint firstAttribute="height" constant="32" id="Opl-4j-wTU"/>
+                                                    </constraints>
+                                                </customView>
+                                                <box boxType="custom" borderWidth="0.0" cornerRadius="4" title="Box" translatesAutoresizingMaskIntoConstraints="NO" id="zKE-Pq-I7d" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                                    <rect key="frame" x="16" y="16" width="82" height="36"/>
+                                                    <view key="contentView" id="cbK-wK-42I">
                                                         <rect key="frame" x="0.0" y="0.0" width="82" height="36"/>
-                                                    </customView>
-                                                </subviews>
-                                                <constraints>
-                                                    <constraint firstItem="WjC-fF-x99" firstAttribute="top" secondItem="cbK-wK-42I" secondAttribute="top" id="KCR-y4-bsp"/>
-                                                    <constraint firstAttribute="bottom" secondItem="WjC-fF-x99" secondAttribute="bottom" id="LEG-lv-ufS"/>
-                                                    <constraint firstAttribute="trailing" secondItem="WjC-fF-x99" secondAttribute="trailing" id="YBc-Lb-UZM"/>
-                                                    <constraint firstItem="WjC-fF-x99" firstAttribute="leading" secondItem="cbK-wK-42I" secondAttribute="leading" id="upx-Do-uTP"/>
-                                                </constraints>
-                                            </view>
+                                                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                                                        <subviews>
+                                                            <customView translatesAutoresizingMaskIntoConstraints="NO" id="WjC-fF-x99" customClass="KMPageNumberDisplayView" customModule="PDF_Reader_Pro" customModuleProvider="target">
+                                                                <rect key="frame" x="0.0" y="0.0" width="82" height="36"/>
+                                                            </customView>
+                                                        </subviews>
+                                                        <constraints>
+                                                            <constraint firstItem="WjC-fF-x99" firstAttribute="top" secondItem="cbK-wK-42I" secondAttribute="top" id="KCR-y4-bsp"/>
+                                                            <constraint firstAttribute="bottom" secondItem="WjC-fF-x99" secondAttribute="bottom" id="LEG-lv-ufS"/>
+                                                            <constraint firstAttribute="trailing" secondItem="WjC-fF-x99" secondAttribute="trailing" id="YBc-Lb-UZM"/>
+                                                            <constraint firstItem="WjC-fF-x99" firstAttribute="leading" secondItem="cbK-wK-42I" secondAttribute="leading" id="upx-Do-uTP"/>
+                                                        </constraints>
+                                                    </view>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="36" id="yPh-H7-5s2"/>
+                                                        <constraint firstAttribute="width" constant="82" id="z3X-e4-sUM"/>
+                                                    </constraints>
+                                                </box>
+                                            </subviews>
                                             <constraints>
-                                                <constraint firstAttribute="height" constant="36" id="yPh-H7-5s2"/>
-                                                <constraint firstAttribute="width" constant="82" id="z3X-e4-sUM"/>
+                                                <constraint firstItem="zKE-Pq-I7d" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" constant="16" id="3s6-Bj-2o2"/>
+                                                <constraint firstAttribute="bottom" secondItem="3E1-9V-2lu" secondAttribute="bottom" constant="16" id="DW1-wF-7bS"/>
+                                                <constraint firstItem="Cdz-fv-u4h" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" id="HaE-rw-x9w"/>
+                                                <constraint firstAttribute="bottom" secondItem="zKE-Pq-I7d" secondAttribute="bottom" constant="16" id="KgI-r0-IvY"/>
+                                                <constraint firstItem="Cdz-fv-u4h" firstAttribute="top" secondItem="Qs2-A4-zLE" secondAttribute="top" id="OKy-PG-6NE"/>
+                                                <constraint firstItem="3E1-9V-2lu" firstAttribute="centerX" secondItem="Qs2-A4-zLE" secondAttribute="centerX" id="OOC-jQ-Ybs"/>
+                                                <constraint firstAttribute="bottom" secondItem="Cdz-fv-u4h" secondAttribute="bottom" id="QSL-Y5-hK2"/>
+                                                <constraint firstAttribute="trailing" secondItem="Cdz-fv-u4h" secondAttribute="trailing" id="cKK-EX-OXI"/>
                                             </constraints>
-                                        </box>
+                                        </customView>
                                     </subviews>
-                                    <constraints>
-                                        <constraint firstItem="zKE-Pq-I7d" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" constant="16" id="3s6-Bj-2o2"/>
-                                        <constraint firstAttribute="bottom" secondItem="3E1-9V-2lu" secondAttribute="bottom" constant="16" id="DW1-wF-7bS"/>
-                                        <constraint firstItem="Cdz-fv-u4h" firstAttribute="leading" secondItem="Qs2-A4-zLE" secondAttribute="leading" id="HaE-rw-x9w"/>
-                                        <constraint firstAttribute="bottom" secondItem="zKE-Pq-I7d" secondAttribute="bottom" constant="16" id="KgI-r0-IvY"/>
-                                        <constraint firstItem="Cdz-fv-u4h" firstAttribute="top" secondItem="Qs2-A4-zLE" secondAttribute="top" id="OKy-PG-6NE"/>
-                                        <constraint firstItem="3E1-9V-2lu" firstAttribute="centerX" secondItem="Qs2-A4-zLE" secondAttribute="centerX" id="OOC-jQ-Ybs"/>
-                                        <constraint firstAttribute="bottom" secondItem="Cdz-fv-u4h" secondAttribute="bottom" id="QSL-Y5-hK2"/>
-                                        <constraint firstAttribute="trailing" secondItem="Cdz-fv-u4h" secondAttribute="trailing" id="cKK-EX-OXI"/>
-                                    </constraints>
-                                </customView>
+                                    <holdingPriorities>
+                                        <real value="250"/>
+                                    </holdingPriorities>
+                                </splitView>
                                 <customView fixedFrame="YES" id="0Bt-mG-vsA">
-                                    <rect key="frame" x="1079" y="0.0" width="256" height="578"/>
+                                    <rect key="frame" x="1058" y="0.0" width="277" height="578"/>
                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
                                 </customView>
                             </subviews>
@@ -140,7 +150,7 @@ Gw
                                 <constraint firstAttribute="height" constant="32" id="Yz2-02-Ux4"/>
                             </constraints>
                         </box>
-                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="z7q-Gv-vF1" customClass="KMBox" customModule="PDF_Master" customModuleProvider="target">
+                        <box boxType="custom" borderWidth="0.0" cornerRadius="4" translatesAutoresizingMaskIntoConstraints="NO" id="z7q-Gv-vF1" customClass="KMBox" customModule="PDF_Reader_Pro" customModuleProvider="target">
                             <rect key="frame" x="0.0" y="0.0" width="1335" height="48"/>
                             <view key="contentView" id="y3C-Id-Gzh">
                                 <rect key="frame" x="0.0" y="0.0" width="1335" height="48"/>
@@ -188,9 +198,9 @@ Gw
             </constraints>
             <point key="canvasLocation" x="457.5" y="352.5"/>
         </customView>
-        <viewController id="2rl-M4-8Gt" customClass="KMToolbarViewController" customModule="PDF_Master" customModuleProvider="target"/>
-        <viewController id="IRu-me-bV3" customClass="KMToolbarController" customModule="PDF_Master" customModuleProvider="target"/>
-        <splitView dividerStyle="thin" vertical="YES" id="r2n-G7-pBF" customClass="KMSplitView" customModule="PDF_Master" customModuleProvider="target">
+        <viewController id="2rl-M4-8Gt" customClass="KMToolbarViewController" customModule="PDF_Reader_Pro" customModuleProvider="target"/>
+        <viewController id="IRu-me-bV3" customClass="KMToolbarController" customModule="PDF_Reader_Pro" customModuleProvider="target"/>
+        <splitView dividerStyle="thin" vertical="YES" id="r2n-G7-pBF" customClass="KMSplitView" customModule="PDF_Reader_Pro" customModuleProvider="target">
             <rect key="frame" x="0.0" y="0.0" width="265" height="250"/>
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
@@ -230,7 +240,7 @@ Gw
                     </constraints>
                     <imageCell key="cell" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="icon_tip_info_small" id="OeM-gK-2cL"/>
                 </imageView>
-                <textField focusRingType="none" horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wp0-L3-5I3">
+                <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="wp0-L3-5I3">
                     <rect key="frame" x="21" y="8" width="734" height="17"/>
                     <textFieldCell key="cell" lineBreakMode="clipping" title="Please use the scroll bar, thumbnail tool to locate the target page, click or box the area to select the target range." id="P3j-kh-acn">
                         <font key="font" metaFont="system" size="14"/>

+ 2 - 2
PDF Office/PDF Master/Class/ToolsLibrary/NSView/KMSplitView.swift

@@ -26,7 +26,7 @@ class KMSplitView: NSSplitView {
         return NSColor.white
     }
     
-    var firstSplitPosition: CGFloat {
+    @objc dynamic var firstSplitPosition: CGFloat {
         get {
             if let view = subviews.first, !isSubviewCollapsed(view) {
                 if isVertical {
@@ -42,7 +42,7 @@ class KMSplitView: NSSplitView {
         }
     }
     
-    var secondSplitPosition: CGFloat {
+    @objc dynamic var secondSplitPosition: CGFloat {
         get {
             if subviews.count > 1 {
                 let view = subviews[1]

+ 64 - 0
PDF Office/PDF Reader Pro.xcodeproj/xcuserdata/kdanmobile.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -20,5 +20,69 @@
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "D2698E9E-6591-4818-82DC-D48433374062"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "330"
+            endingLineNumber = "330"
+            landmarkName = "splitView(_:constrainMaxCoordinate:ofSubviewAt:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "C2FF957C-635A-4EF6-9DB8-378CE1DB1B31"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "291"
+            endingLineNumber = "291"
+            landmarkName = "splitView(_:shouldCollapseSubview:forDoubleClickOnDividerAt:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "6C5B99FF-A24D-4B90-B66F-5D820E3F42DE"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "284"
+            endingLineNumber = "284"
+            landmarkName = "splitView(_:canCollapseSubview:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
+      <BreakpointProxy
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
+         <BreakpointContent
+            uuid = "AF26BCA9-0B2E-4692-9D5A-4949AAB77BAB"
+            shouldBeEnabled = "Yes"
+            ignoreCount = "0"
+            continueAfterRunningActions = "No"
+            filePath = "PDF Master/Class/PDFWindowController/ViewController/KMMainViewController+UI.swift"
+            startingColumnNumber = "9223372036854775807"
+            endingColumnNumber = "9223372036854775807"
+            startingLineNumber = "401"
+            endingLineNumber = "401"
+            landmarkName = "splitView(_:resizeSubviewsWithOldSize:)"
+            landmarkType = "7">
+         </BreakpointContent>
+      </BreakpointProxy>
    </Breakpoints>
 </Bucket>