Browse files

move app_delegate to App.delegate

  • Loading branch information...
1 parent f39563e commit d9a7a192df695b4fba4ecd0e10aad06fe90f924a @siuying siuying committed May 10, 2012
Showing with 6 additions and 5 deletions.
  1. +6 −1 lib/app.rb
  2. +0 −4 lib/kernel.rb
View
7 lib/app.rb
@@ -12,12 +12,17 @@ def states
def name
NSBundle.mainBundle.bundleIdentifier
end
-
+
# Return application frame
def frame
UIScreen.mainScreen.applicationFrame
end
+ # Application Delegate
+ def delegate
+ UIApplication.sharedApplication.delegate
+ end
+
# Persistence module built on top of NSUserDefaults
module Persistence
def self.app_key
View
4 lib/kernel.rb
@@ -36,10 +36,6 @@ def resources_path
NSBundle.mainBundle.resourcePath
end
- def app_delegate
- UIApplication.sharedApplication.delegate
- end
-
def orientation
case UIDevice.currentDevice.orientation
when UIDeviceOrientationUnknown then :unknown

0 comments on commit d9a7a19

Please sign in to comment.