Hi, I'm still learning swift and I have 2 questions:
- Why is this not working?
override func shouldPerformSegue(withIdentifier identifier: String, sender: Any?) -> Bool {
if segueSwitch.isOn {
print("It is on") //super.shouldPerformSegue(withIdentifier: identifier, sender: Any?.self)
return true
} else {
return false } }
My switch is on, so according to to the documentation I called the function under IBAction button with shouldPerformSegue(withIdentifier: "Yellow", sender: nil) Nothing happens, my segue identifier is correct.
- As you can see I have a comment written above, do I need to call the super.method in order for the function to have the same ability as the documentation?
Just like how viewDidLoad() has a super.viewDidLoad to maintain the basic view defined in the superclass