12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //
- // AccountMoreBenefitsController.swift
- // PDF Reader Pro
- //
- // Created by User-Tangchao on 2024/10/30.
- //
- import Cocoa
- class AccountMoreBenefitsController: NSViewController {
- @IBOutlet weak var headerBox: NSBox!
- @IBOutlet weak var contentBox: NSBox!
-
- @IBOutlet weak var backButton: NSButton!
- @IBOutlet weak var headerBottomLine: NSView!
-
- var rightDatas: [String] = []
- var datas: [ProductListModel] = []
-
- var itemClick: KMCommonClickBlock?
-
- private var benefitsC_: AccountBenefitsController?
-
- convenience init() {
- self.init(nibName: "AccountMoreBenefitsController", bundle: nil)
- }
-
- override func viewDidLoad() {
- super.viewDidLoad()
- // Do view setup here.
-
- self.headerBox.borderWidth = 0
- self.contentBox.borderWidth = 0
-
- self.backButton.title = "< " + NSLocalizedString("Back", comment: "")
- self.backButton.setTitleColor(KMAppearance.themeColor())
- self.headerBottomLine.wantsLayer = true
- self.headerBottomLine.layer?.backgroundColor = NSColor(hex: "#EBEFF4").cgColor
-
- self.backButton.target = self
- self.backButton.action = #selector(buttonAction)
-
- self.showBenefit()
- }
-
- func showBenefit() {
- let vc = AccountBenefitsController()
- vc.rightDatas = self.rightDatas
- vc.datas = self.datas
- self.benefitsC_ = vc
- self.contentBox.contentView = vc.view
- }
-
- @objc func buttonAction() {
- self.itemClick?(1)
- }
-
- }
|