lgg
lgg
  • 发布:2016-04-25 14:16
  • 更新:2016-04-25 14:34
  • 阅读:1820

我用native.js跳转到原生的ViewController,崩溃了

分类:Native.js

我用native.js跳转到原生的ViewController,崩溃了

报错
bool _WebTryThreadLock(bool), 0x14027e180: Tried to obtain the web lock from a thread other than the main thread or the web thread. This may be a result of calling to UIKit from a secondary thread. Crashing now...

原生的ViewController里有一个WebView,
经测试,有Web的话就会崩溃,猜想可能是线程问题,请问怎么解决,在线等.急

2016-04-25 14:16 负责人:无 分享
已邀请:
骁骑

骁骑

换个方式,由NativeJS发送一个消息,在原生层监听这个消息,再异步打开新的VC

// IOS触发原生监听的消息
var notiClass = plus.ios.importClass("NSNotificationCenter");
notiClass.defaultCenter().postNotificationNameobject("CloseWebAPP",null);

  • lgg (作者)

    解决了 感谢

    2016-05-07 13:40

  • 宋欣

    解决个大问题 。谢谢

    2016-05-23 15:01

该问题目前已经被锁定, 无法添加新回复