Fixed issue when testing ProMotion apps where the on_load never fires.

This commit is contained in:
Jamon Holmgren
2013-05-10 10:41:19 -07:00
parent 8394cdfca2
commit 738ce1b922
3 changed files with 30 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
class AppDelegate
def application(application, didFinishLaunchingWithOptions:launchOptions)
return true if RUBYMOTION_ENV == 'test'
def on_load(app, options)
open BasicScreen
end
end

View File

@@ -0,0 +1,27 @@
class BasicScreen < PM::Screen
title "Basic"
def on_init
# Fires right after the screen is initialized
end
def on_load
# Fires just before a screen is opened for the first time.
end
def will_appear
# Fires every time the screen will appear
end
def on_appear
# Fires just after the screen appears somewhere (after animations are complete)
end
def will_disappear
# Fires just before the screen will disappear
end
def on_disappear
# Fires after the screen is fully hidden
end
end