Returning a return value from a resume() callback in Swift
January 19, 2016 9:50 amCategorised in: Swift
Reading Time: < 1
Having trouble with Swift functions that run an async session e.g. getting image or JSON data from a server? Me too. This post on Stack Overflow saved my mental state from debilitating further. To fix you want to set your function up like this: getJsonOffServer(imageId: String, completion: ((image: UIImage?) -> Void)) {... View Article