|
@@ -33,6 +33,8 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
|
|
|
|
|
|
var notInTab = false
|
|
|
|
|
|
+ var fromAPI = false
|
|
|
+
|
|
|
public override func viewDidLoad() {
|
|
|
super.viewDidLoad()
|
|
|
|
|
@@ -45,6 +47,11 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
|
|
|
// tableView.separatorColor = .gray
|
|
|
tableView.separatorStyle = .none
|
|
|
|
|
|
+ if fromAPI {
|
|
|
+ let backButton = UIBarButtonItem(image: UIImage(systemName: "chevron.backward"), style: .plain, target: self, action: #selector(self.didTapExit))
|
|
|
+ self.navigationItem.leftBarButtonItem = backButton
|
|
|
+ }
|
|
|
+
|
|
|
switchVibrateMode.tintColor = .gray
|
|
|
switchSaveToGallery.tintColor = .gray
|
|
|
switchAutoDownload.tintColor = .gray
|
|
@@ -67,6 +74,10 @@ public class SettingTableViewController: UITableViewController, UIGestureRecogni
|
|
|
switchSaveToGallery.addTarget(self, action: #selector(saveToGallerySwitch), for: .valueChanged)
|
|
|
switchAutoDownload.addTarget(self, action: #selector(autoDownloadSwitch), for: .valueChanged)
|
|
|
}
|
|
|
+
|
|
|
+ @objc func didTapExit() {
|
|
|
+ self.dismiss(animated: true)
|
|
|
+ }
|
|
|
|
|
|
public override func viewWillDisappear(_ animated: Bool) {
|
|
|
separatorBackupRestore.removeFromSuperview()
|