ios - executeQuery in swift -


this block of code giving error in swift language working in objective c

this working code of objective c.

    [plusservice executequery:query             completionhandler:^(gtlserviceticket *ticket,                                 gtlplusperson *person,                                 nserror *error) {      }]; 

and have changed swift giving me error

plusservice.executequery(query, completionhandler:  { (ticket: gtlserviceticket, person: gtlplusperson , error: nserror) -> void in              println(person)         }) 

in objective-c

[plusservice executequery:query             completionhandler:^(gtlserviceticket *ticket,                                 gtlplusperson *person,                                 nserror *error) {         if (error) {             //handle error         } else { //do  }     }]; 

for swift

plusservice.executequery(query, completionhandler:  { (ticket, person , error) -> void in     println(person)     }) 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -