// SmartLinkViewController为要跳转的原生页面
var newVCobj = plus.ios.newObject("SmartLinkViewController");
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);
plus.ios.invoke(appRootController, "pushViewController:animated:", newVCobj, "YES");
觅安科技
- 发布:2020-08-24 11:06
- 更新:2021-11-11 09:13
- 阅读:1027
1 个回复
小静
同问,请问如何解决的