Skip to content

Instantly share code, notes, and snippets.

@tudormunteanu
Created April 12, 2012 09:17
Show Gist options
  • Select an option

  • Save tudormunteanu/2365784 to your computer and use it in GitHub Desktop.

Select an option

Save tudormunteanu/2365784 to your computer and use it in GitHub Desktop.
Simple Notification registering
- (void) changeLanguage:(NSNotification *)notif {
}
- (void) registerNotifications {
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(changeLanguage:)
name:kLanguageChangeNotification object:nil];
}
// Post notification that the download is complete
[[NSNotificationCenter defaultCenter] postNotificationName:kLanguageChangeNotification object:nil];
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment