|
@@ -74,9 +74,6 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
|
|
|
|
|
|
self.title = NSLocalizedString("_upload_photos_videos_", comment: "")
|
|
|
|
|
|
- view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
|
|
|
- tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
|
|
|
-
|
|
|
self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_cancel_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(cancel))
|
|
|
self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: NSLocalizedString("_save_", comment: ""), style: UIBarButtonItem.Style.plain, target: self, action: #selector(save))
|
|
|
|
|
@@ -88,7 +85,8 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
- tableView.reloadData()
|
|
|
+ setColors(userInterfaceStyle: nil)
|
|
|
+
|
|
|
initializeForm()
|
|
|
reloadForm()
|
|
|
}
|
|
@@ -100,6 +98,28 @@ class NCCreateFormUploadAssets: XLFormViewController, NCSelectDelegate {
|
|
|
self.delegate?.dismissFormUploadAssets()
|
|
|
}
|
|
|
|
|
|
+ override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
|
|
+ super.traitCollectionDidChange(previousTraitCollection)
|
|
|
+
|
|
|
+ setColors(userInterfaceStyle: traitCollection.userInterfaceStyle)
|
|
|
+ }
|
|
|
+
|
|
|
+ // MARK: - Colors
|
|
|
+
|
|
|
+ func setColors(userInterfaceStyle: UIUserInterfaceStyle?) {
|
|
|
+
|
|
|
+ if userInterfaceStyle == .dark {
|
|
|
+ // personalized
|
|
|
+ } else {
|
|
|
+ // personalized
|
|
|
+ }
|
|
|
+
|
|
|
+ view.backgroundColor = NCBrandColor.shared.systemGroupedBackground
|
|
|
+ tableView.backgroundColor = NCBrandColor.shared.systemGroupedBackground
|
|
|
+
|
|
|
+ tableView.reloadData()
|
|
|
+ }
|
|
|
+
|
|
|
//MARK: XLForm
|
|
|
|
|
|
func initializeForm() {
|