Deselect table row on settings table click

This commit is contained in:
Maurice Parker 2019-04-28 14:45:09 -05:00
parent 9b17f3394f
commit 44eae7e70c

View File

@ -54,8 +54,6 @@ class SettingsViewController: UITableViewController {
override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
switch indexPath.section { switch indexPath.section {
case 0:
print("Accounts isn't ready yet")
case 1: case 1:
switch indexPath.row { switch indexPath.row {
case 0: case 0:
@ -72,7 +70,7 @@ class SettingsViewController: UITableViewController {
} }
case 2: case 2:
UIApplication.shared.open(URL(string: "https://appcamp4girls.com/contribute/")!, options: [:]) UIApplication.shared.open(URL(string: "https://appcamp4girls.com/contribute/")!, options: [:])
default: case 4:
switch indexPath.row { switch indexPath.row {
case 0: case 0:
let timeline = UIStoryboard.settings.instantiateController(ofType: RefreshIntervalViewController.self) let timeline = UIStoryboard.settings.instantiateController(ofType: RefreshIntervalViewController.self)
@ -86,8 +84,12 @@ class SettingsViewController: UITableViewController {
default: default:
print("export") print("export")
} }
default:
break
} }
tableView.selectRow(at: nil, animated: true, scrollPosition: .none)
} }
@IBAction func done(_ sender: Any) { @IBAction func done(_ sender: Any) {