We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScriptCore framework 是 iOS7 新引入的功能。该框架让 Objective-C 和 JavaScript 代码直接的交互变得更加的简单方便。
JavaScriptCore 可以理解为一个可运行 JavaScript 的容器,除了以往的 WebView 容器有这个能力以外。
同时,JavaScriptCore 能获取 WebView 容器执行 JavaScript 上下文环境,拥有 H5 与 Native 交互的能力,如 Hybrid 技术。
同样,JavaScriptCore 也能单独运行 JavaScript,如 React-Native 技术、JSpatch 技术。
要使用JavaScriptCore,首先我们需要引入它的头文件 #import <JavaScriptCore/JavaScriptCore.h>
#import <JavaScriptCore/JavaScriptCore.h>
链到这个头文件,内容如下:
里面引入了几个重要的类:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
JavaScriptCore framework 是 iOS7 新引入的功能。该框架让 Objective-C 和 JavaScript 代码直接的交互变得更加的简单方便。
JavaScriptCore 可以理解为一个可运行 JavaScript 的容器,除了以往的 WebView 容器有这个能力以外。
同时,JavaScriptCore 能获取 WebView 容器执行 JavaScript 上下文环境,拥有 H5 与 Native 交互的能力,如 Hybrid 技术。
同样,JavaScriptCore 也能单独运行 JavaScript,如 React-Native 技术、JSpatch 技术。
JavaScriptCore中的类
要使用JavaScriptCore,首先我们需要引入它的头文件
#import <JavaScriptCore/JavaScriptCore.h>
链到这个头文件,内容如下:
里面引入了几个重要的类:
并且都有对象的方法转换为native对象
The text was updated successfully, but these errors were encountered: