Skip to content

Instantly share code, notes, and snippets.

@TonnyXu
Created January 18, 2011 01:37
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save TonnyXu/783851 to your computer and use it in GitHub Desktop.
Save TonnyXu/783851 to your computer and use it in GitHub Desktop.
All the notifications predefined by UIKit framework. Apple should provide this but they don't. So, take it if you need it.
// UIApplication.h
UIApplicationDidEnterBackgroundNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
UIApplicationWillEnterForegroundNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
UIApplicationDidFinishLaunchingNotification;
UIApplicationDidBecomeActiveNotification;
UIApplicationWillResignActiveNotification;
UIApplicationDidReceiveMemoryWarningNotification;
UIApplicationWillTerminateNotification;
UIApplicationSignificantTimeChangeNotification;
UIApplicationWillChangeStatusBarOrientationNotification; // userInfo contains NSNumber with new orientation
UIApplicationDidChangeStatusBarOrientationNotification; // userInfo contains NSNumber with old orientation
UIApplicationWillChangeStatusBarFrameNotification; // userInfo contains NSValue with new frame
UIApplicationDidChangeStatusBarFrameNotification; // userInfo contains NSValue with old frame
UIApplicationLaunchOptionsRemoteNotificationKey __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0); // userInfo contains NSDictionary with payload
UIApplicationLaunchOptionsLocalNotificationKey __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0); // userInfo contains a UILocalNotification
// UIDevice.h
UIDeviceOrientationDidChangeNotification;
UIDeviceBatteryStateDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
UIDeviceBatteryLevelDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
UIDeviceProximityStateDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_3_0);
// UILocalNotification.h
UILocalNotificationDefaultSoundName __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_0);
// UIMenuController.h
UIMenuControllerWillShowMenuNotification;
UIMenuControllerDidShowMenuNotification;
UIMenuControllerWillHideMenuNotification;
UIMenuControllerDidHideMenuNotification;
UIMenuControllerMenuFrameDidChangeNotification;
// UIPasteboard.h
UIPasteboardChangedNotification;
UIPasteboardRemovedNotification;
// UIScreen.h
UIScreenDidConnectNotification; // object is the UIScreen that represents the new screen. connection notifications are not sent for screens present when the application is first launched
UIScreenDidDisconnectNotification; // object is the UIScreen that represented the disconnected screen
UIScreenModeDidChangeNotification; // object is the UIScreen. [object currentMode] is the new UIScreenMode
// UITableView.h
UITableViewSelectionDidChangeNotification;
//UITextField.h
UITextFieldTextDidBeginEditingNotification;
UITextFieldTextDidEndEditingNotification;
UITextFieldTextDidChangeNotification;
// UITextInput.h
UITextInputCurrentInputModeDidChangeNotification __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_4_2);
// UIWindow.h
UIWindowDidBecomeVisibleNotification; // nil
UIWindowDidBecomeHiddenNotification; // nil
UIWindowDidBecomeKeyNotification; // nil
UIWindowDidResignKeyNotification; // nil
UIKeyboardWillShowNotification;
UIKeyboardDidShowNotification;
UIKeyboardWillHideNotification;
UIKeyboardDidHideNotification;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment