|
|
|
# Notifications
|
|
|
|
|
|
|
|
https://developer.apple.com/reference/foundation/nsnotificationcenter
|
|
|
|
|
|
|
|
|
|
|
|
## You should do the following:
|
|
|
|
1. Create a branch from develop called feature/notifications
|
|
|
|
2. Add “Randomize order” button to `OrganizationInfoViewController`. It should randomize the order of employees in an organization.
|
|
|
|
3. Declare `kEmployeesOrderHasChanged` string constant.
|
|
|
|
4. Implement a logic of reloading table view on `MainViewController` after randomizing order in `OrganizationViewController` with the help of `NSNotificationCenter`.
|
|
|
|
5. Create a pull request from your branch to develop.
|
|
|
|
|
|
|
|
|
|
|
|
## You should be able to answer the following questions:
|
|
|
|
* What is `NSNotificationCenter`?
|
|
|
|
* What is the difference between delegation and notifications patterns?
|
|
|
|
* How to unsubscribe from notifications? How and when should it be used? Is it mandatory? |