Skip to content

Instantly share code, notes, and snippets.

@romainmenke
Last active September 15, 2015 02:24
Show Gist options
  • Save romainmenke/5a81d734ad7c655878c4 to your computer and use it in GitHub Desktop.
Save romainmenke/5a81d734ad7c655878c4 to your computer and use it in GitHub Desktop.
let ticket = ticketMan.ticket
//put this inside a loop
if self.ticketMan.validateTicket(ticket) == false {
self.ticketMan.ripTicket(ticket) // destroy ticket
return // escape from function
}
//this is the end of the highlighting function
dispatch_sync(dispatch_get_main_queue()) { () -> Void in
self.ticketMan.ripTicket(ticket) // return ticket
completion(finished: true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment