Bladeren bron

【订阅】比较表、权益界面文案调整

lizhe 1 jaar geleden
bovenliggende
commit
924999fcd9

+ 26 - 26
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/KMComparativeView.swift

@@ -37,18 +37,19 @@ class KMComparativeView: KMBaseXibView {
         [
         [
             "type": 0,
             "type": 0,
             "title": "Registered",
             "title": "Registered",
-            "subtitle": "Free",
+            "subtitle": "Free Plan",
+            "describe": "Simply log in and get benefits.",
             "content": [
             "content": [
-                ["title": "Basic functions like annotation and viewing",
-                 "state": true],
-                ["title": "Convert PDF to Office (Only first ten pages)",
-                 "state": true],
-                ["title": "Save without watermark",
-                 "state": false],
                 ["title": "AI translate, rewrite, correction",
                 ["title": "AI translate, rewrite, correction",
-                 "state": false]
+                 "state": 2],
+                ["title": "Save without watermark",
+                 "state": 2],
+                ["title": "Convert with 10 pages per file",
+                 "state": 0],
+                ["title": "Basic functions like annotation and viewing",
+                 "state": 0]
             ],
             ],
-            "buttonTitle": "Sign up for Free"
+            "buttonTitle": "Free Trial"
         ],
         ],
         [
         [
             "type": 1,
             "type": 1,
@@ -57,16 +58,16 @@ class KMComparativeView: KMBaseXibView {
             "describe": "Save 50%@ for the first year, auto-renew at %@. Billed yearly.",
             "describe": "Save 50%@ for the first year, auto-renew at %@. Billed yearly.",
             "productId": PRODUCT_1,
             "productId": PRODUCT_1,
             "content": [
             "content": [
-                ["title": "Enjoy all premium features",
-                 "state": true],
-                ["title": "Convert PDF to Office without limitation",
-                 "state": true],
-                ["title": "Save without watermark",
-                 "state": true],
                 ["title": "AI translate, rewrite, correction",
                 ["title": "AI translate, rewrite, correction",
-                 "state": true]
+                 "state": 1],
+                ["title": "Save without watermark",
+                 "state": 1],
+                ["title": "Convert PDF to Office without limitation",
+                 "state": 1],
+                ["title": "Unlock all premium features",
+                 "state": 1]
             ],
             ],
-            "buttonTitle": "Subscribe Now"
+            "buttonTitle": "Buy Now"
         ]
         ]
     ]
     ]
     
     
@@ -186,20 +187,18 @@ class KMComparativeView: KMBaseXibView {
     }
     }
     
     
     func setupPopover() {
     func setupPopover() {
-        let string: NSString = NSLocalizedString("""
-            Payment will be charged to your Apple ID account at the confirmation of purchase.
-            Subscription automatically renews unless it is canceled at least 24 hours before
-            the end of the current period. Your account will be charged for renewal within 24
-            hours prior to the end of the current period. You can manage and cancel your
-            subscriptions by going to your account settings on the App Store after purchase.
-            """, comment: "") as NSString
+        let string: NSString = NSLocalizedString(
+"""
+Payment will be charged to your Apple ID account at the confirmation of purchase.\nSubscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
+"""
+            , comment: "") as NSString
         
         
         let paragraphStyle = NSMutableParagraphStyle()
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.4
         paragraphStyle.lineHeightMultiple = 1.4
         paragraphStyle.alignment = .left
         paragraphStyle.alignment = .left
         let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
         let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
-        let size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 400), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
-        
+        var size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 600), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
+        size = CGSize(width: size.width, height: size.height + 30)
         
         
         popover.behavior = .transient
         popover.behavior = .transient
         popover.setValue(true, forKey: "shouldHideAnchor")
         popover.setValue(true, forKey: "shouldHideAnchor")
@@ -214,6 +213,7 @@ class KMComparativeView: KMBaseXibView {
         textField.drawsBackground = false
         textField.drawsBackground = false
         textField.isEditable = false
         textField.isEditable = false
         textField.isSelectable = false
         textField.isSelectable = false
+        textField.lineBreakMode = .byCharWrapping
         textField.textColor = NSColor(hex: "#FFFFFF")
         textField.textColor = NSColor(hex: "#FFFFFF")
         
         
         popover.contentViewController?.view.addSubview(textField)
         popover.contentViewController?.view.addSubview(textField)

+ 1 - 1
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItem.swift

@@ -191,7 +191,7 @@ class KMComparativeViewCollectionItem: NSCollectionViewItem {
                 let describeString = NSString(format: describe as NSString, "%",priceString)
                 let describeString = NSString(format: describe as NSString, "%",priceString)
                 let attributedString = NSMutableAttributedString(string: describeString as String)
                 let attributedString = NSMutableAttributedString(string: describeString as String)
                 let range = (describeString as NSString).range(of: priceString)
                 let range = (describeString as NSString).range(of: priceString)
-                attributedString.addAttribute(NSAttributedString.Key.strikethroughStyle, value: NSNumber(value: NSUnderlineStyle.single.rawValue), range: range)
+//                attributedString.addAttribute(NSAttributedString.Key.strikethroughStyle, value: NSNumber(value: NSUnderlineStyle.single.rawValue), range: range)
                 attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: describeString.length))
                 attributedString.addAttribute(NSAttributedString.Key.paragraphStyle, value: paragraphStyle, range: NSRange(location: 0, length: describeString.length))
                 self.describeLabel.attributedStringValue = attributedString
                 self.describeLabel.attributedStringValue = attributedString
             }
             }

+ 5 - 3
PDF Office/PDF Master/Class/KMLightMember/Controller/ComparativeTable/View/KMComparativeView/View/KMComparativeViewCollectionItemItem.swift

@@ -25,11 +25,13 @@ class KMComparativeViewCollectionItemItem: NSCollectionViewItem {
     
     
     func reloadData() {
     func reloadData() {
         if data.count != 0 {
         if data.count != 0 {
-            let state: Bool = data["state"] as? Bool ?? false
-            if state == false {
+            let state: Int = data["state"] as? Int ?? 0
+            if state == 2 {
                 self.iconImageView.image = NSImage(named: "icon_info")
                 self.iconImageView.image = NSImage(named: "icon_info")
-            } else {
+            } else if state == 1 {
                 self.iconImageView.image = NSImage(named: "tips")
                 self.iconImageView.image = NSImage(named: "tips")
+            } else if state == 0 {
+                self.iconImageView.image = NSImage(named: "tips 1")
             }
             }
             
             
             let string = NSLocalizedString(data["title"] as! String, comment: "")
             let string = NSLocalizedString(data["title"] as! String, comment: "")

+ 11 - 16
PDF Office/PDF Master/Class/KMLightMember/Controller/SubscriptionView/WaterMark/View/KMSubscribeWaterMarkView.swift

@@ -128,11 +128,7 @@ class KMSubscribeWaterMarkView: KMBaseXibView {
         self.subscribeLabel.stringValue = NSLocalizedString("Subscribe", comment: "")
         self.subscribeLabel.stringValue = NSLocalizedString("Subscribe", comment: "")
 //        + "  " + NSLocalizedString("Subscription", comment: ""
 //        + "  " + NSLocalizedString("Subscription", comment: ""
         let string = NSLocalizedString("""
         let string = NSLocalizedString("""
-Payment will be charged to your Apple ID account at the confirmation of purchase.
-Subscription automatically renews unless it is canceled at least 24 hours before
-the end of the current period. Your account will be charged for renewal within 24
-hours prior to the end of the current period. You can manage and cancel your
-subscriptions by going to your account settings on the App Store after purchase.
+            Payment will be charged to your Apple ID account at the confirmation of purchase.Subscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
 """, comment: "")
 """, comment: "")
         let attributedString = NSMutableAttributedString.init(string: string)
         let attributedString = NSMutableAttributedString.init(string: string)
         let paragraphStyle = NSMutableParagraphStyle()
         let paragraphStyle = NSMutableParagraphStyle()
@@ -240,20 +236,18 @@ extension KMSubscribeWaterMarkView {
     }
     }
     
     
     func setupPopover() {
     func setupPopover() {
-        let string: NSString = NSLocalizedString("""
-            Payment will be charged to your Apple ID account at the confirmation of purchase.
-            Subscription automatically renews unless it is canceled at least 24 hours before
-            the end of the current period. Your account will be charged for renewal within 24
-            hours prior to the end of the current period. You can manage and cancel your
-            subscriptions by going to your account settings on the App Store after purchase.
-            """, comment: "") as NSString
+        let string: NSString = NSLocalizedString(
+"""
+Payment will be charged to your Apple ID account at the confirmation of purchase.\nSubscription automatically renews unless it is canceled at least 24 hours before the end of the current period. Your account will be charged for renewal within 24 hours prior to the end of the current period. You can manage and cancel your subscriptions by going to your account settings on the App Store after purchase.
+"""
+            , comment: "") as NSString
         
         
         let paragraphStyle = NSMutableParagraphStyle()
         let paragraphStyle = NSMutableParagraphStyle()
         paragraphStyle.lineHeightMultiple = 1.4
         paragraphStyle.lineHeightMultiple = 1.4
         paragraphStyle.alignment = .left
         paragraphStyle.alignment = .left
         let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
         let attributes = [NSAttributedString.Key.font : NSFont.SFProTextRegular(12), NSAttributedString.Key.paragraphStyle : paragraphStyle]
-        let size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 400), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
-        
+        var size: NSSize = string.boundingRect(with: NSSize(width: 420, height: 600), options: NSString.DrawingOptions(rawValue: 3), attributes: attributes).size
+        size = CGSize(width: size.width, height: size.height + 30)
         
         
         popover.behavior = .transient
         popover.behavior = .transient
         popover.setValue(true, forKey: "shouldHideAnchor")
         popover.setValue(true, forKey: "shouldHideAnchor")
@@ -265,9 +259,10 @@ extension KMSubscribeWaterMarkView {
         let textField = NSTextField(frame: NSRect(x: 16, y: 8, width: size.width - 32, height: size.height - 16))
         let textField = NSTextField(frame: NSRect(x: 16, y: 8, width: size.width - 32, height: size.height - 16))
         textField.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string as String, comment: ""), attributes: attributes)
         textField.attributedStringValue = NSMutableAttributedString(string: NSLocalizedString(string as String, comment: ""), attributes: attributes)
         textField.backgroundColor(NSColor(hex: "#000000"))
         textField.backgroundColor(NSColor(hex: "#000000"))
+        textField.drawsBackground = false
         textField.isEditable = false
         textField.isEditable = false
-        textField.isSelectable = true
-        textField.backgroundColor(NSColor.clear)
+        textField.isSelectable = false
+        textField.lineBreakMode = .byCharWrapping
         textField.textColor = NSColor(hex: "#FFFFFF")
         textField.textColor = NSColor(hex: "#FFFFFF")
         
         
         popover.contentViewController?.view.addSubview(textField)
         popover.contentViewController?.view.addSubview(textField)

File diff suppressed because it is too large
+ 1 - 9
PDF Office/PDF Master/Strings/en.lproj/Localizable.strings