summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-10-04 10:37:25 -0400
committerJoel Fischer <joeljfischer@gmail.com>2018-10-04 10:37:25 -0400
commit8fae43f2c382f8b4271401b0bdd217fa53964c4a (patch)
tree8163b8a1987e05f6c6d5a9312272cc0e0f192a9e
parentb0aeade70e1a2e6a18af10696124919f42a57e5d (diff)
downloadsdl_ios-8fae43f2c382f8b4271401b0bdd217fa53964c4a.tar.gz
Fix swift app not remembering tab
-rw-r--r--Example Apps/Example Swift/ConnectionContainerViewController.swift3
1 files changed, 2 insertions, 1 deletions
diff --git a/Example Apps/Example Swift/ConnectionContainerViewController.swift b/Example Apps/Example Swift/ConnectionContainerViewController.swift
index de7f12898..431888dc9 100644
--- a/Example Apps/Example Swift/ConnectionContainerViewController.swift
+++ b/Example Apps/Example Swift/ConnectionContainerViewController.swift
@@ -75,7 +75,8 @@ class ConnectionContainerViewController: UIViewController {
}
func loadChildViewController(index: Int?) {
- let initialViewController: UIViewController = viewControllers[index!] as! UIViewController
+ AppUserDefaults.shared.lastUsedSegment = index
+ let initialViewController: UIViewController = viewControllers[index!]
self.addChildViewController(initialViewController)
view.addSubview(initialViewController.view)
initialViewController.didMove(toParentViewController: self)