[Solved] How to write following method in swift? [closed]


Use this :
//Define your function like this

func initWithAnnotation(annotation:MKAnnotation, reuseIdentifier:String, completion: ()->Void) {
          //Your implementation goes here

         //for call back
         completion()
    }

//call above function by this:

 self.initWithAnnotation(Your_MKProtocol, reuseIdentifier: "identifier", completion: {
                  //Your call back implementations
                 //Similar to delegate callback
       })

solved How to write following method in swift? [closed]