Tried to obtain the web lock from a thread other than the main thread or the web thread. Crashing now

前端 未结 6 1435
轮回少年
轮回少年 2020-12-10 01:03

bool _WebTryThreadLock(bool), 0x8053ce0: 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 UI

6条回答
  •  盖世英雄少女心
    2020-12-10 02:03

    //The easiest way is to call the function using main thread for that.

    dispatch_async(dispatch_get_main_queue(), ^{ [self doSomething]; });

提交回复
热议问题