ruby - add child screen to parent screen with rmq -


in on_load method of homescreen class want rmq.append(loginscreen, :login_form). loginscreen inherits pm::formscreen. enter image description here

since not implementing initwithframe in loginscreen app crashes.

this has been done in http://jamonholmgren.com/getting-started-with-motionkit-and-promotion/ motion kit. how can achieve same rmq?

you're going need create instance of screen , add view.

def on_load   @login_screen = loginscreen.new   addchildviewcontroller @login_screen   rmq.append(uiimageview, :logo)   rmq.append(@login_screen.view, :login_form) end 

the addchildviewcontroller ensures lifecycle events called on loginscreen.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -