Last active
February 28, 2017 13:53
-
-
Save stephen-francis/b323c14aa696c9a1807e0cd50b25f26f to your computer and use it in GitHub Desktop.
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
| var foodStuffs = [Food]() { | |
| didSet { | |
| // because we perform this operation on the main thread, it is safe | |
| OperationQueue.main.addOperation { // this will not crash | |
| self.tableView.reloadData() | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment