Customized user scripts/stylesheets: iPhone fixes
This commit is contained in:
@@ -14,6 +14,9 @@ class CodeEditorSettingsView: UIView
|
||||
override init(frame: CGRect) {
|
||||
super.init(frame: frame)
|
||||
|
||||
self.backgroundColor = UIColor.systemBackground
|
||||
|
||||
textView.backgroundColor = UIColor.secondarySystemBackground
|
||||
textView.font = .monospacedSystemFont(ofSize: 12.0, weight: .regular)
|
||||
textView.autocorrectionType = .no
|
||||
textView.autocapitalizationType = .none
|
||||
@@ -66,6 +69,11 @@ class CodeEditorSettingsViewController: UIViewController, UITextViewDelegate
|
||||
settingsView.textView.text = Settings.shared[keyPath: settingsKeypath]
|
||||
}
|
||||
|
||||
override func viewWillDisappear(_ animated: Bool) {
|
||||
super.viewWillDisappear(animated)
|
||||
saveContents()
|
||||
}
|
||||
|
||||
private func saveContents() {
|
||||
Settings.shared[keyPath: settingsKeypath] = settingsView.textView.text!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user