Skip to content

Commit 676db08

Browse files
author
Steve Trease
committed
disable link layer toggle when IPv6 off
1 parent 91ac6fa commit 676db08

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

IP Address/ViewController.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSour
5151
// Toggle switches toggled
5252
@IBAction func switchToggled(_ sender: UISwitch) {
5353
print (NSURL (fileURLWithPath: "\(#file)").lastPathComponent!, "\(#function)")
54+
if (sender == IPv6filterSwitch) {
55+
if (IPv6filterSwitch.isOn) {
56+
linkLayerfilterSwitch.isEnabled = true
57+
} else {
58+
linkLayerfilterSwitch.isEnabled = false
59+
}
60+
}
5461
refreshAndSortAndFilterData()
5562
self.tableView.reloadData()
5663
}

0 commit comments

Comments
 (0)