Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ViewController
import UIKit
class ViewController: UIViewController {
@IBAction func buttonTapped(_ sender: Any) {
performSegue(withIdentifier: "showWebView", sender: sender)
}
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let button = sender as? UIButton, let destination = segue.destination as? WebViewController {
destination.colour = button.titleLabel?.text
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.