Exemplo n.º 1
0
 public static void SwitchView <TargetController>(this ViewControllerBase controller, Action onFinish = null)
     where TargetController : ViewControllerBase
 {
     controller.Hide(() =>
                     controller.viewManager.GetController <TargetController>().Show(onFinish)
                     );
 }
    static int Hide(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                Nova.ViewControllerBase obj = (Nova.ViewControllerBase)ToLua.CheckObject <Nova.ViewControllerBase>(L, 1);
                obj.Hide();
                return(0);
            }
            else if (count == 2)
            {
                Nova.ViewControllerBase obj  = (Nova.ViewControllerBase)ToLua.CheckObject <Nova.ViewControllerBase>(L, 1);
                System.Action           arg0 = (System.Action)ToLua.CheckDelegate <System.Action>(L, 2);
                obj.Hide(arg0);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: Nova.ViewControllerBase.Hide"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }