Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simulate Slow Connection
let task = URLSession.shared.dataTask(with: req) { (data, response, error) in
...
}
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(4)) {
task.resume()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.