ios-------------------
// NewViewController为应用内创建的原生的ViewController类名,所调用页面的内容需要在原生代码中完成
var newVCobj = plus.ios.newObject("NewViewController");
var UIApplicationClass = plus.ios.importClass("UIApplication");
var UIAppObj = UIApplicationClass.sharedApplication();
var del = plus.ios.invoke(UIAppObj,"delegate");
// 如果当前应用delegate对象包含UIWindow对象并且变量名命名为“window”可以这么写,
// 否则需要根据实际代码情况修改
// 应用的delegate对象也可以添加一个返回UIViewController的方法
var appWindowObj = plus.ios.invoke(del,"window");
var appRootController = plus.ios.invoke(appWindowObj,"rootViewController");
plus.ios.invoke(appRootController,"presentViewController:animated:completion:",newVCobj,"YES",null);
HBuilder-----------------------------
https://blog.csdn.net/column/details/hbuild-hybrid-app.html
网友评论