Consider the following code, which prints `"working"` when a button is pressed:

```
protocol MyClassDelegate: class {
    func foo()
}

class MyClass {

    weak var delegate: MyClassDelegate?

    func foo() {
        delegate?.foo()
    }

    let button: UIButton = {
        button.addTarget(self, action: #selector(foo), for: .touchUpInside)
        return button
    }()
}

class MyViewController { ... }

extension MyViewController: MyClassDelegate {
    func foo() {
        print("working")
    }
}

```

When I try adding a parameter to `MyClassDelegate`'s `foo` method, `"working"` stops printing (meaning the button stops working?). I.e.:

```
protocol MyClassDelegate: class {
    func foo(_ str: String)
}

class MyClass {

    weak var delegate: MyClassDelegate?

    func foo() {
        delegate?.foo("working")
    }

    let button: UIButton = {
        button.addTarget(self, action: #selector(foo), for: .touchUpInside)
        return button
    }()
}

class MyViewController { ... }

extension MyViewController: MyClassDelegate {
    func foo(_ str: String) {
        print(str)
    }
}

```

How can I get the second version of the code with the parameter to work? Thanks.