123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- import Foundation
- @objc class NCViewRichWorkspace: UIView {
-
- @IBOutlet weak var webView: WKWebView!
- required init?(coder: NSCoder) {
- super.init(coder: coder)
-
- NotificationCenter.default.addObserver(self, selector: #selector(self.changeTheming), name: NSNotification.Name(rawValue: "changeTheming"), object: nil)
- self.backgroundColor = NCBrandColor.sharedInstance.brand;
- }
-
- @objc func changeTheming() {
- self.backgroundColor = NCBrandColor.sharedInstance.brand;
- }
-
- @objc func setRichWorkspaceText(_ richWorkspace: String?) {
-
- let html = "<h2><span style=\"color: #000000;\">" + richWorkspace! + "</span></h2>"
-
- webView.loadHTMLString(html, baseURL: Bundle.main.bundleURL)
- webView.isUserInteractionEnabled = false
- }
- }
- @objc class NCRichWorkspaceViewTouch: UIView {
- let appDelegate = UIApplication.shared.delegate as! AppDelegate
- var startPosition: CGPoint?
- var originalHeight: CGFloat = 0
- let minHeight: CGFloat = 0
- let maxHeight: CGFloat = UIScreen.main.bounds.size.height/3
- required init?(coder: NSCoder) {
- super.init(coder: coder)
-
- self.backgroundColor = NCBrandColor.sharedInstance.separator
- }
-
-
- }
|