doorxp Blog

WKWebView DEBUG

#ifdef DEBUG

  SEL sel = NSSelectorFromString(@"_enableRemoteInspector");

  id cls = NSClassFromString(@"WebView");

  IMP imp = [cls sel];

  void (*func)(id, SEL) = (void *)imp;

  func(cls, sel);

#endif


add to 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions


作者:doorxp 分类:ObjC 浏览:338 评论:0
留言列表
发表评论
来宾的头像