Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

move app_delegate to App.delegate

  • Loading branch information...
commit d9a7a192df695b4fba4ecd0e10aad06fe90f924a 1 parent f39563e
@siuying siuying authored
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
Please sign in to comment.
Something went wrong with that request. Please try again.