Permalink
Browse files

add default notification center short hand

  • Loading branch information...
siuying committed May 10, 2012
1 parent d9a7a19 commit 7d36a30a8206a0bd510345fa846ac0bdac96b8b1
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/kernel.rb
View
@@ -36,6 +36,12 @@ def resources_path
NSBundle.mainBundle.resourcePath
end
+ # Returns the default notification center
+ # @return [NSNotificationCenter] the default notification center
+ def notification_center
+ NSNotificationCenter.defaultCenter
+ end
+
def orientation
case UIDevice.currentDevice.orientation
when UIDeviceOrientationUnknown then :unknown

0 comments on commit 7d36a30

Please sign in to comment.