I have two controllers, and I need to call the function of the first controller for the second controller: In the second controller, I created a protocol and delegate init to the class:
protocol testProtocol { func testDelegate()
First controller
class ViewController: UIViewController, testProtocol {
var secondController: SecondViewController = SecondViewController() override func viewDidLoad() { super.viewDidLoad() secondController.delegate = self } func testDelegate() { println("Hello delegate") }</pre> But the function does not receive the call
ios uiviewcontroller ios8 swift
Lola
source share