|
|
# GCD and Math
|
|
|
|
|
|
https://www.raywenderlich.com/79149/grand-central-dispatch-tutorial-swift-part-1
|
|
|
|
|
|
https://developer.apple.com/videos/play/wwdc2016/720/
|
|
|
|
|
|
https://github.com/SVProgressHUD/SVProgressHUD
|
|
|
|
|
|
|
|
|
## You should do the following:
|
|
|
1. Create a new branch from develop called feature/gcd
|
|
|
2. Connect a new library `SVProgressHUD` via `CocoaPods`.
|
|
|
3. Add a new button to `OrganizationInfoViewController` called “Calculate 10000th prime number”. It should calculate 10000th prime number in a background queue (global queue). Upon completion it should output the result in an `UIAlertController`. `SVProgressHUD` should be shown during calculation.
|
|
|
4. Create a pull request.
|
|
|
|
|
|
*HARDMODE: Write function for determining prime number yourself, without googling. Prime number = простое число.*
|
|
|
|
|
|
|
|
|
## You should be able to answer the following questions:
|
|
|
* What is `GCD` used for?
|
|
|
* What is main queue?
|
|
|
* What is the difference between sync and async?
|
|
|
* Can UI be changed in global queue? |