How to start new activity in corona?

天大地大妈咪最大 提交于 2020-01-06 20:04:27

问题


I am new on Corona and worked with android sdk on Eclipse but i don't know how to pass from one activity to another in this one? What do you we use for this on Corona?


回答1:


You do not have control over activities of your app when using Corona SDK.

What you need is the StoryBoard API which helps you to manage difference scenes. Here are a few links regarding storyboard.

http://www.coronalabs.com/blog/2011/11/14/introducing-the-storyboard-api/

http://www.coronalabs.com/blog/2012/03/27/storyboard-scene-events-explained/

http://developer.anscamobile.com/content/storyboard

http://www.coronalabs.com/blog/2011/11/16/common-storyboard-api-questions/

Another unofficial but really efficient and useful method is the Director class

http://maniacdev.com/2011/05/using-the-director-class-for-easy-switching-in-the-corona-sdk/

http://developer.anscamobile.com/code/director-class-10

The PROS and CONS?

Director class is very simple and lightweight. And it has no known bugs. Used to be the only way until Storyboard was introduced a few months ago. Story board is very flexible, and is officially supported. But it is relatively new and has some minor bugs.



来源:https://stackoverflow.com/questions/11083472/how-to-start-new-activity-in-corona

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!