Skip to content

Instantly share code, notes, and snippets.

Avatar

xiaohu zxhfirefox

  • China
View GitHub Profile
@zxhfirefox
zxhfirefox / block.swift
Last active Jan 24, 2019
Block in Block
View block.swift
class Test {
let networkClient: NetworkClient
let jsonSerilizer: JSONSerilizer
let logger: Logger
func run(completion: @escaping (Result) -> Void) {
let url: URL = URL(...)
logger.log("send request to \(url)"
networkClient.request(url) { [weak self] response, error in
guard let self = self else { return }
You can’t perform that action at this time.