This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let url = NSURL(string: "https://www.google.net") | |
let request = NSURLRequest(URL: url!) | |
let group = dispatch_group_create() | |
for index in 1...100 { | |
dispatch_group_enter(group) | |
NSURLConnection.sendAsynchronousRequest(request, queue: NSOperationQueue.mainQueue()) {(response, data, error) in | |
println("\(index) complete") | |
dispatch_group_leave(group) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
NOTE!!!! | |
The most updated version of this code is here: | |
https://github.com/scottjehl/iOS-Orientationchange-Fix |