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
Post a Comment