- Make a new PROJECT in xcode
- Make two methods, one called getNewPhotos(completion: () -> Void) and the other called uploadPhotos(completion: () -> Void)
- Both methods should get a random number between 0 and 10, print out the random number, and write NSThread.sleepForTimeInterval(YourRandomTimeHere)
- Make both methods completion blocks that complete when they are done
- In the viewDidLoad, call both methods and then (once both are done) print "All done!"
- Notice that they run one at a time and then finally print All Done!
- Try running both methods at the same time by adding dispatch_async to both of the methods (see GCD stretch problem
- What issues arise?
Once finished, we'll go over a solution together.