JGuizard
7/19/2016 - 9:58 AM

Create a delegate in Swift

Create a delegate in Swift

import Foundation

protocol SessionsDelegate: class {
    
    func onSessionsReceived()
    func onSessionsError(code:Int,msg:String)

}


/*
class ViewController: UIViewController, SessionsDelegate
{
    func onSessionsReceived()
    {
      //code
    }
    
    func onSessionsError(code:Int,msg:String)
    {
      //code
    }
}
*/