summaryrefslogtreecommitdiff
path: root/Example Apps/Example Swift/ConnectionContainerViewController.swift
diff options
context:
space:
mode:
Diffstat (limited to 'Example Apps/Example Swift/ConnectionContainerViewController.swift')
-rw-r--r--Example Apps/Example Swift/ConnectionContainerViewController.swift5
1 files changed, 3 insertions, 2 deletions
diff --git a/Example Apps/Example Swift/ConnectionContainerViewController.swift b/Example Apps/Example Swift/ConnectionContainerViewController.swift
index e990712fa..de7f12898 100644
--- a/Example Apps/Example Swift/ConnectionContainerViewController.swift
+++ b/Example Apps/Example Swift/ConnectionContainerViewController.swift
@@ -22,8 +22,9 @@ class ConnectionContainerViewController: UIViewController {
viewControllers.append(tcpController)
viewControllers.append(iapController)
- segmentedControl.selectedSegmentIndex = 0
- loadChildViewController(index: 0)
+ let defaultSegment = AppUserDefaults.shared.lastUsedSegment!
+ segmentedControl.selectedSegmentIndex = defaultSegment
+ loadChildViewController(index: defaultSegment)
let leftSwipe = UISwipeGestureRecognizer(target: self, action: #selector(slideToLeftWithGestureRecognizer(gestureRecognizer:)))
let rightSwipe = UISwipeGestureRecognizer(target: self, action: #selector(slideToRightWithGestureRecognizer(gestureRecognizer:)))