Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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