小编use*_*878的帖子

Delegate Method is not called in Swift?

I want to pass a Bool value from on view controller to another without the help of segues. So i referred & got Delegates.

I have applied delegates in my App. But the Delegate method is not being called. I don't know where i am making the mistake.

So Please help me.

MainViewController

class MainViewController: UIViewController, WriteValueBackDelegate {

    @IBOutlet weak var LoginButton: UIButton!
    var LoggedInL :Bool?

    override func viewDidLoad() {
        super.viewDidLoad()
    }

    func writeValueBack(value: Bool) {
        println("Delegate Method")
        if (value …
Run Code Online (Sandbox Code Playgroud)

delegates swift swift-protocols

2
推荐指数
1
解决办法
4400
查看次数

标签 统计

delegates ×1

swift ×1

swift-protocols ×1