Skip to content

Instantly share code, notes, and snippets.

hello
@petoye
petoye / git
Created January 22, 2017 05:07
To revert to a previous commit, ignoring any changes:
git reset --hard HEAD
Create a Notification Name:
extension Notification.Name {
static let reload = Notification.Name("reload")
}
You can post a notification
NotificationCenter.default.post(name: .reload, object: nil)
And add an observer at the view controller that you want to reload the data: