You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by ji...@apache.org on 2017/03/10 10:08:20 UTC
[42/51] [partial] incubator-weex-site git commit: Site updated:
2017-03-10 18:07:21
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/95bb2077/cn/references/advanced/extend-to-ios.html
----------------------------------------------------------------------
diff --git a/cn/references/advanced/extend-to-ios.html b/cn/references/advanced/extend-to-ios.html
new file mode 100644
index 0000000..bb06a67
--- /dev/null
+++ b/cn/references/advanced/extend-to-ios.html
@@ -0,0 +1,1492 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+
+ <title>iOS \u6269\u5c55 | Weex</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <meta name="description" content="Module \u6269\u5c55swift \u6269\u5c55 module
+Weex SDK \u53ea\u63d0\u4f9b\u6e32\u67d3\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u7684\u80fd\u529b\uff0c\u5982\u679c\u4f60\u9700\u8981 \u50cf\u7f51\u7edc\uff0c\u56fe\u7247\uff0cURL\u8df3\u8f6c\u8fd9\u4e9b\u7279\u6027\uff0c\u9700\u8981\u81ea\u5df1\u52a8\u624b\u5b9e\u73b0\u4ed6\u4eec\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5b9e\u73b0\u4e00\u4e2aurl\u5730\u5740\u8df3\u8f6c\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\u5b9e\u73b0\u4e00\u4e2a Module
+\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4
+\u81ea\u5b9a\u4e49\u7684module\u7c7b \u5fc5\u987b\u5b9e\u73b0 WXModuleProtocol
+\u5fc5\u987b\u6dfb\u52a0\u5b8fWX_EXPORT_METHOD, \u5b83\u53ef\u4ee5\u88abw">
+<meta property="og:type" content="website">
+<meta property="og:title" content="iOS \u6269\u5c55">
+<meta property="og:url" content="https://weex.apache.org/cn/references/advanced/extend-to-ios.html">
+<meta property="og:site_name" content="Weex">
+<meta property="og:description" content="Module \u6269\u5c55swift \u6269\u5c55 module
+Weex SDK \u53ea\u63d0\u4f9b\u6e32\u67d3\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u7684\u80fd\u529b\uff0c\u5982\u679c\u4f60\u9700\u8981 \u50cf\u7f51\u7edc\uff0c\u56fe\u7247\uff0cURL\u8df3\u8f6c\u8fd9\u4e9b\u7279\u6027\uff0c\u9700\u8981\u81ea\u5df1\u52a8\u624b\u5b9e\u73b0\u4ed6\u4eec\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5b9e\u73b0\u4e00\u4e2aurl\u5730\u5740\u8df3\u8f6c\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\u5b9e\u73b0\u4e00\u4e2a Module
+\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4
+\u81ea\u5b9a\u4e49\u7684module\u7c7b \u5fc5\u987b\u5b9e\u73b0 WXModuleProtocol
+\u5fc5\u987b\u6dfb\u52a0\u5b8fWX_EXPORT_METHOD, \u5b83\u53ef\u4ee5\u88abw">
+<meta property="og:updated_time" content="2017-03-08T06:04:50.000Z">
+<meta name="twitter:card" content="summary">
+<meta name="twitter:title" content="iOS \u6269\u5c55">
+<meta name="twitter:description" content="Module \u6269\u5c55swift \u6269\u5c55 module
+Weex SDK \u53ea\u63d0\u4f9b\u6e32\u67d3\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u7684\u80fd\u529b\uff0c\u5982\u679c\u4f60\u9700\u8981 \u50cf\u7f51\u7edc\uff0c\u56fe\u7247\uff0cURL\u8df3\u8f6c\u8fd9\u4e9b\u7279\u6027\uff0c\u9700\u8981\u81ea\u5df1\u52a8\u624b\u5b9e\u73b0\u4ed6\u4eec\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5b9e\u73b0\u4e00\u4e2aurl\u5730\u5740\u8df3\u8f6c\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\u5b9e\u73b0\u4e00\u4e2a Module
+\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4
+\u81ea\u5b9a\u4e49\u7684module\u7c7b \u5fc5\u987b\u5b9e\u73b0 WXModuleProtocol
+\u5fc5\u987b\u6dfb\u52a0\u5b8fWX_EXPORT_METHOD, \u5b83\u53ef\u4ee5\u88abw">
+
+ <link rel="alternate" href="/atom.xml" title="Weex" type="application/atom+xml">
+
+
+ <link rel="icon" href="//gw.alicdn.com/tps/TB1XNqxPXXXXXcSXVXXXXXXXXXX-64-63.png">
+
+
+ <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
+
+ <link rel="stylesheet" href="/css/style.css">
+ <link rel="stylesheet" href="/css/swiper.min.css">
+</head>
+
+<body id="references" class="lang-cn">
+
+ <script>
+ window.PAGE_TYPE = "references";
+ window.ROOT = "/"
+ </script>
+ <header id="header">
+ <div class="navbar">
+ <a id="logo" href="/cn/">
+ <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+ </a>
+ <div class="main-nav">
+ <ul class="links">
+ <li><a href="/cn/guide">\u6559\u7a0b</a></li>
+ <li><a href="/cn/references">\u624b\u518c</a></li>
+ <li><a href="/cn/faq.html">FAQ</a></li>
+ <li class="dropdown">
+ <a href="javascript:;">\u4e0b\u8f7d</a>
+ <ul class="dropdown-menu subnav">
+ <li>
+ <a href="/cn/playground.html">Playground</a>
+ </li>
+ <li>
+ <a href="https://www.npmjs.com/package/weex-devtool" target="_blank">Devtool</a>
+ </li>
+ <li>
+ <a href="https://www.npmjs.com/package/weexpack" target="_blank">Weexpack</a>
+ </li>
+ <li>
+ <a href="http://dotwe.org" target="_blank">Snippets</a>
+ </li>
+ <li>
+ <a href="https://market.weex-project.io/" target="_blank">Market</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="info">
+ <li><a href="https://github.com/alibaba/weex/" target="_blank"><span class="btn-github iconfont icon-github"></span></a></li>
+ </ul>
+ <ul class="tools">
+ <li>
+ <div class="search">
+ <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+ <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+ <span class="iconfont icon-search"></span>
+ </form>
+ <div class="results-panel">
+ </div>
+</div>
+ </li>
+ <li>
+ <div class="dropdown select-lang">
+ <a href="javascript:;" class="dropdown-toggle">
+ Language
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu pick-lang">
+ <li>
+ <a href="/references/advanced/extend-to-ios.html" data-lang="en">English</a>
+ </li>
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" data-lang="zh-cn">\u4e2d\u6587</a>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <!--<li></li>-->
+ </ul>
+ </div>
+ </div>
+ <div id="mobile-nav">
+ <a id="logo" href="/cn/">
+ <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+ </a>
+ <a class="btn-menu"><span class="iconfont icon-nav"></span></a>
+ </div>
+</header>
+ <div id="sidebar" class="">
+ <div class="sidebar-menu">
+
+ <div class="search">
+ <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+ <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+ <span class="iconfont icon-search"></span>
+ </form>
+ <div class="results-panel">
+ </div>
+</div>
+
+
+
+<div class="summary">
+ <h2 class="part-title">
+
+ \u624b\u518c
+
+ </h2>
+ <ul class="doc-summary">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">\u901a\u7528\u7279\u6027</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/common-style.html" class="sidebar-link ">\u901a\u7528\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/text-style.html" class="sidebar-link ">\u6587\u672c\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/color-names.html" class="sidebar-link ">\u989c\u8272\u540d\u79f0\u5217\u8868</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/gesture.html" class="sidebar-link ">\u624b\u52bf</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/path.html" class="sidebar-link ">Path (\u82f1)</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">\u5185\u5efa\u7ec4\u4ef6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/components/a.html" class="sidebar-link "><a></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/text.html" class="sidebar-link "><text></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/video.html" class="sidebar-link "><video></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/web.html" class="sidebar-link "><web></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/div.html" class="sidebar-link "><div></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/image.html" class="sidebar-link "><image></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/input.html" class="sidebar-link "><input></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/list.html" class="sidebar-link "><list></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">\u5185\u5efa\u6a21\u5757</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS \u5355\u4f4d</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">\u901a\u7528\u4e8b\u4ef6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex \u5b9e\u4f8b\u53d8\u91cf</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web \u6807\u51c6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x \u5728 Weex \u548c Web \u4e2d\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">\u4f7f\u7528 Vuex \u548c vue-router</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">\u9ad8\u9636\u77e5\u8bc6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link current ">iOS \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">\u62d3\u5c55 JS framework</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 Android</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 iOS</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">\u8fc1\u79fb</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex \u548c Web \u5e73\u53f0\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">\u5982\u4f55\u5c06\u539f\u6709 Weex \u9879\u76ee\u6539\u9020\u6210 Vue \u7248\u672c</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex \u548c Vue 2.x \u7684\u8bed\u6cd5\u5dee\u5f02</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">\u65e7\u8bed\u6cd5\u6587\u6863</a></h3>
+ </li>
+
+ </ul>
+</div>
+
+ <a class="btn-close-sidebar iconfont icon-close"></a>
+ </div>
+</div>
+ <div class="article-wrapper page-layout">
+ <div class="doc-nav">
+
+
+
+<div class="summary">
+ <h2 class="part-title">
+
+ \u624b\u518c
+
+ </h2>
+ <ul class="doc-summary">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">\u901a\u7528\u7279\u6027</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/common-style.html" class="sidebar-link ">\u901a\u7528\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/text-style.html" class="sidebar-link ">\u6587\u672c\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/color-names.html" class="sidebar-link ">\u989c\u8272\u540d\u79f0\u5217\u8868</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/gesture.html" class="sidebar-link ">\u624b\u52bf</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/path.html" class="sidebar-link ">Path (\u82f1)</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">\u5185\u5efa\u7ec4\u4ef6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/components/a.html" class="sidebar-link "><a></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/text.html" class="sidebar-link "><text></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/video.html" class="sidebar-link "><video></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/web.html" class="sidebar-link "><web></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/div.html" class="sidebar-link "><div></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/image.html" class="sidebar-link "><image></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/input.html" class="sidebar-link "><input></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/list.html" class="sidebar-link "><list></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">\u5185\u5efa\u6a21\u5757</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS \u5355\u4f4d</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">\u901a\u7528\u4e8b\u4ef6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex \u5b9e\u4f8b\u53d8\u91cf</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web \u6807\u51c6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x \u5728 Weex \u548c Web \u4e2d\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">\u4f7f\u7528 Vuex \u548c vue-router</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link ">\u9ad8\u9636\u77e5\u8bc6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link current ">iOS \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">\u62d3\u5c55 JS framework</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 Android</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 iOS</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">\u8fc1\u79fb</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex \u548c Web \u5e73\u53f0\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">\u5982\u4f55\u5c06\u539f\u6709 Weex \u9879\u76ee\u6539\u9020\u6210 Vue \u7248\u672c</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex \u548c Vue 2.x \u7684\u8bed\u6cd5\u5dee\u5f02</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">\u65e7\u8bed\u6cd5\u6587\u6863</a></h3>
+ </li>
+
+ </ul>
+</div>
+ </div>
+
+
+<article class="article article-type-references">
+ <div class="article-entry" itemprop="articleBody">
+ <header class="article-header">
+
+
+ <h1 class="article-title" itemprop="name">
+ iOS \u6269\u5c55
+ </h1>
+
+
+ <time class="article-date" datetime="2017-03-08T06:04:50.000Z">Updated time: 08/03/2017</time>
+</header>
+ <h2 id="Module-\u6269\u5c55"><a href="#Module-\u6269\u5c55" class="headerlink" title="Module \u6269\u5c55"></a>Module \u6269\u5c55</h2><p><a href="https://github.com/weexteam/article/issues/55" target="_blank" rel="external">swift</a> \u6269\u5c55 module </p>
+<p>Weex SDK \u53ea\u63d0\u4f9b\u6e32\u67d3\uff0c\u800c\u4e0d\u662f\u5176\u4ed6\u7684\u80fd\u529b\uff0c\u5982\u679c\u4f60\u9700\u8981 \u50cf\u7f51\u7edc\uff0c\u56fe\u7247\uff0cURL\u8df3\u8f6c\u8fd9\u4e9b\u7279\u6027\uff0c\u9700\u8981\u81ea\u5df1\u52a8\u624b\u5b9e\u73b0\u4ed6\u4eec<br>\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5b9e\u73b0\u4e00\u4e2aurl\u5730\u5740\u8df3\u8f6c\u51fd\u6570\uff0c\u4f60\u53ef\u4ee5\u6309\u7167\u5982\u4e0b\u6b65\u9aa4\u5b9e\u73b0\u4e00\u4e2a Module</p>
+<h3 id="\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4"><a href="#\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4" class="headerlink" title="\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4"></a><strong>\u81ea\u5b9a\u4e49module\u7684\u6b65\u9aa4</strong></h3><ol>
+<li>\u81ea\u5b9a\u4e49\u7684module\u7c7b \u5fc5\u987b\u5b9e\u73b0 <code>WXModuleProtocol</code></li>
+<li>\u5fc5\u987b\u6dfb\u52a0\u5b8f<code>WX_EXPORT_METHOD</code>, \u5b83\u53ef\u4ee5\u88abweex\u8bc6\u522b\uff0c\u5b83\u7684\u53c2\u6570\u662f JavaScript\u8c03\u7528 module\u6307\u5b9a\u65b9\u6cd5\u7684\u53c2\u6570</li>
+<li>\u6dfb\u52a0<code>@synthesized weexInstance</code>\uff0c\u6bcf\u4e2amoudle\u5bf9\u8c61\u88ab\u7ed1\u5b9a\u5230\u4e00\u4e2a\u6307\u5b9a\u7684\u5b9e\u4f8b\u4e0a</li>
+<li>Module \u65b9\u6cd5\u4f1a\u5728UI\u7ebf\u7a0b\u4e2d\u88ab\u8c03\u7528\uff0c\u6240\u4ee5\u4e0d\u8981\u505a\u592a\u591a\u8017\u65f6\u7684\u4efb\u52a1\u5728\u8fd9\u91cc\uff0c\u5982\u679c\u8981\u5728\u5176\u4ed6\u7ebf\u7a0b\u6267\u884c\u6574\u4e2amodule \u65b9\u6cd5\uff0c\u9700\u8981\u5b9e\u73b0<code>WXModuleProtocol</code>\u4e2d<code>- (NSThread *)targetExecuteThread</code>\u7684\u65b9\u6cd5\uff0c\u8fd9\u6837\uff0c\u5206\u53d1\u5230\u8fd9\u4e2amodule\u7684\u4efb\u52a1\u4f1a\u5728\u6307\u5b9a\u7684\u7ebf\u7a0b\u4e2d\u8fd0\u884c</li>
+<li>Weex \u7684\u53c2\u6570\u53ef\u4ee5\u662f String \u6216\u8005Map</li>
+<li><p>Module \u652f\u6301\u8fd4\u56de\u503c\u7ed9 JavaScript\u4e2d\u7684\u56de\u8c03\uff0c\u56de\u8c03\u7684\u7c7b\u578b\u662f<code>WXModuleCallback</code>,\u56de\u8c03\u7684\u53c2\u6570\u53ef\u4ee5\u662fString\u6216\u8005Map</p>
+ <figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">@implementation WXEventModule</div><div class="line">@synthesize weexInstance;</div><div class="line"> WX_EXPORT_METHOD(@selector(openURL:callback))</div><div class="line">- (void)openURL:(NSString *)url callback:(WXModuleCallback)callback</div><div class="line">{</div><div class="line"> NSString *newURL = url;</div><div class="line"> if ([url hasPrefix:@"//"]) {</div><div class="line"> newURL = [NSString stringWithFormat:@"http:%@", url];</div><div class="line"> } else if (![url hasPrefix:@"http"]) {</div><div class="line"> newURL = [NSURL URLWithString:url relativeToURL:weexInstance.scriptURL].absoluteString;</div><div class="line"> }</div><div class="line"></div><div class="line"> UIViewController *controller = [[WXDemoViewController alloc] init];</div><div class="line"> ((WXDemoViewController *)controller).u
rl = [NSURL URLWithString:newURL];</div><div class="line"></div><div class="line"> [[weexInstance.viewController navigationController] pushViewController:controller animated:YES];</div><div class="line"> callback(@{@"result":@"success"});</div><div class="line">}</div><div class="line"></div><div class="line">@end</div></pre></td></tr></table></figure>
+</li>
+</ol>
+<p>\u53e6\u5916\uff0c<code>0.10.0</code> \u5f00\u59cb\u652f\u6301\u540c\u6b65\u6a21\u5757 API \u8c03\u7528\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5b8f <code>WX_EXPORT_METHOD_SYNC</code> \u5bfc\u51fa\u6a21\u5757\u65b9\u6cd5\uff0c\u8fd9\u4e9b\u65b9\u6cd5\u53ef\u4ee5\u4f7f JavaScript \u63a5\u53d7\u4ece native \u8fd4\u56de\u7684\u503c\uff0c\u5b83\u53ea\u80fd\u5728 JS \u7ebf\u7a0b\u88ab\u8c03\u7528\u3002</p>
+<h3 id="\u6ce8\u518c-module"><a href="#\u6ce8\u518c-module" class="headerlink" title="\u6ce8\u518c module"></a>\u6ce8\u518c module</h3><p>\u901a\u8fc7\u8c03\u7528 WXSDKEngine \u4e2d\u7684 <code>registerModule:withClass</code>\u65b9\u6cd5\u6765\u6ce8\u518c\u81ea\u5df1\u7684module</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">WXSDKEngine.h</div><div class="line">/**</div><div class="line">* @abstract Registers a module for a given name</div><div class="line">* @param name The module name to register</div><div class="line">* @param clazz The module class to register</div><div class="line">**/</div><div class="line">+ (void)registerModule:(NSString *)name withClass:(Class)clazz;</div><div class="line">[WXSDKEngine registerModule:@"event" withClass:[WXEventModule class]];</div></pre></td></tr></table></figure>
+<h3 id="\u4f7f\u7528\u81ea\u5df1\u7684-module"><a href="#\u4f7f\u7528\u81ea\u5df1\u7684-module" class="headerlink" title="\u4f7f\u7528\u81ea\u5df1\u7684 module"></a>\u4f7f\u7528\u81ea\u5df1\u7684 module</h3><p>\u8fd9\u91cc\u7684 require \u91cc\u9762\u7684 event \u5c31\u662f\u5728 \u4e0a\u4e00\u6b65\u8c03\u7528 <code>registerModule:</code> \u6ce8\u518c module \u65f6\u5019\u7684 name</p>
+<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line"><span class="keyword">var</span> eventModule = weex.requireModule(<span class="string">'event'</span>); </div><div class="line">eventModule.openURL(<span class="string">'url'</span>,<span class="function"><span class="keyword">function</span>(<span class="params">ret</span>) </span>{ </div><div class="line"> nativeLog(ret);</div><div class="line">});</div></pre></td></tr></table></figure>
+<p>Weex SDK \u6ca1\u6709 \u56fe\u7247\u4e0b\u8f7d\uff0cnavigation \u64cd\u4f5c\u7684\u80fd\u529b\uff0c\u8bf7\u5927\u5bb6\u81ea\u5df1\u5b9e\u73b0\u8fd9\u4e9b protocol</p>
+<h2 id="WXImgLoaderProtocol"><a href="#WXImgLoaderProtocol" class="headerlink" title="WXImgLoaderProtocol"></a>WXImgLoaderProtocol</h2><p>weexSDK \u6ca1\u6709\u56fe\u7247\u4e0b\u8f7d\u7684\u80fd\u529b\uff0c\u9700\u8981\u5b9e\u73b0 WXImgLoaderProtocol, \u53c2\u8003\u4e0b\u9762\u7684\u4f8b\u5b50</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">WXImageLoaderProtocol.h</div><div class="line">@protocol WXImgLoaderProtocol <WXModuleProtocol></div><div class="line">/**</div><div class="line">* @abstract Creates a image download handler with a given URL</div><div class="line">* @param imageUrl The URL of the image to download</div><div class="line">* @param imageFrame The frame of the image you want to set</div><div class="line">* @param options : The options to be used for this download</div><div class="line">* @param completedBlock : A block called once the download is completed.</div><div class="line"> image : the image which has been download to local.</div><div class="line"> error : the error which has happened in download.</div><div class="line"> finished : a Boolean value indicating whether download action has finished.</div><div class="line">*/</div><div class="line">-(id<WXImageOperationProtocol>)downloadImageWithUR
L:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)options completed:(void(^)(UIImage *image, NSError *error, BOOL finished))completedBlock;</div><div class="line">@end</div></pre></td></tr></table></figure>
+<p>\u5b9e\u73b0\u4e0a\u8ff0\u534f\u8bae </p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">@implementation WXImgLoaderDefaultImpl</div><div class="line">#pragma mark -</div><div class="line">#pragma mark WXImgLoaderProtocol</div><div class="line"></div><div class="line">- (id<WXImageOperationProtocol>)downloadImageWithURL:(NSString *)url imageFrame:(CGRect)imageFrame userInfo:(NSDictionary *)userInfo completed:(void(^)(UIImage *image, NSError *error, BOOL finished))completedBlock</div><div class="line">{</div><div class="line"> if ([url hasPrefix:@"//"]) {</div><div class="line"> url = [@"http:" stringByAppendingString:url];</div><div class="line"> }</div><div class="line"> return (id<WXImageOperationProtocol>)[[SDWebImageManager sharedManager] downloadImageWithURL:[NSURL URLWithString:url] options:0 progress:^(NSInteger receivedSize, NSInteger expectedSize) { </div><div class="line"> } completed:^(UIImage *ima
ge, NSError *error, SDImageCacheType cacheType, BOOL finished, NSURL *imageURL) {</div><div class="line"> if (completedBlock) {</div><div class="line"> completedBlock(image, error, finished);</div><div class="line"> }</div><div class="line"> }];</div><div class="line">}</div><div class="line">@end</div></pre></td></tr></table></figure>
+<h3 id="handler\u6ce8\u518c"><a href="#handler\u6ce8\u518c" class="headerlink" title="handler\u6ce8\u518c"></a>handler\u6ce8\u518c</h3><p>\u4f60\u53ef\u4ee5\u901a\u8fc7WXSDKEngine \u4e2d\u7684 <code>registerHandler:withProtocol</code>\u6ce8\u518chandler</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">WXSDKEngine.h</div><div class="line">/**</div><div class="line">* @abstract Registers a handler for a given handler instance and specific protocol</div><div class="line">* @param handler The handler instance to register</div><div class="line">* @param protocol The protocol to confirm</div><div class="line">*/</div><div class="line">+ (void)registerHandler:(id)handler withProtocol:(Protocol *)protocol;</div><div class="line"></div><div class="line">[WXSDKEngine registerHandler:[WXImgLoaderDefaultImpl new] withProtocol:@protocol(WXImgLoaderProtocol)]</div></pre></td></tr></table></figure>
+<h2 id="Components-\u6269\u5c55"><a href="#Components-\u6269\u5c55" class="headerlink" title="Components \u6269\u5c55"></a>Components \u6269\u5c55</h2><p>\u867d\u7136 WeexSDK \u4e2d\u6709\u5f88\u591a\u7684 native \u7684 Component\uff0c\u4f46\u8fd9\u6709\u53ef\u80fd\u5e76\u4e0d\u80fd\u6ee1\u8db3\u4f60\u7684\u9700\u6c42\u3002\u5728\u4e4b\u524d\u4f60\u53ef\u80fd\u5df2\u7ecf\u5199\u4e86\u4e00\u4e9b\u5f88\u9177\u70ab native \u7684\u7ec4\u4ef6\uff0c\u60f3\u5305\u88c5\u4e00\u4e0b\uff0c\u5bfc\u5165\u5230 Weex \u4e2d\uff0c\u56e0\u6b64\u6211\u4eec\u63d0\u4f9b\u4e86\u8ba9\u5f00\u53d1\u8005\u5b9e\u73b0\u81ea\u5df1\u7684 native Component\u3002\u4e0b\u9762\u5c06\u4ee5 WeexSDK \u4e2d\u5df2\u7ecf\u5b58\u5728\u7684 Component\uff1a<code>image</code> \u4e3a\u4f8b\u5b50\uff0c\u4ecb\u7ecd\u4e00\u4e0b\u5982\u4f55\u6784\u5efa\u4e00\u4e2a native Component\u3002\u5047\u8bbe\u4f60\u5df2\u7ecf\u4e86\u89e3 iOS \u5f00\u53d1</p>
+<h3 id="\u6ce8\u518c-Component"><a href="#\u6ce8\u518c-Component" class="headerlink" title="\u6ce8\u518c Component"></a>\u6ce8\u518c Component</h3><p>\u6ce8\u518c\u4e00\u4e2a component \u6bd4\u8f83\u7b80\u5355\uff0c\u8c03\u7528 <code>WXSDKEngine</code> \u4e2d\u7684 <code>registerComponent:withClass:</code> \u65b9\u6cd5\uff0c\u4f20\u5165\u7ec4\u4ef6\u7684\u6807\u7b7e\u540d\u79f0\uff0c\u8fd8\u6709\u5bf9\u5e94\u7684 class \u7136\u540e\u4f60\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a <code>WXImageComponent</code> \u8868\u793a <code>image</code> \u7ec4\u4ef6\u7684\u5b9e\u73b0\u3002\u5728 <code>.we</code> \u6587\u4ef6\u4e2d\uff0c\u53ea\u9700\u8981\u5199 <code><image></image></code></p>
+<h3 id="\u6dfb\u52a0\u5c5e\u6027"><a href="#\u6dfb\u52a0\u5c5e\u6027" class="headerlink" title="\u6dfb\u52a0\u5c5e\u6027"></a>\u6dfb\u52a0\u5c5e\u6027</h3><p>\u73b0\u5728\u6211\u4eec\u8981\u505a\u4e00\u4e9b\u8ba9 image component \u66f4\u52a0\u5f3a\u5927\u7684\u4e8b\u60c5\u3002\u65e2\u7136\u4f5c\u4e3a\u4e00\u4e2a\u56fe\u7247\u7684 component\uff0c\u90a3\u5b83\u5e94\u8be5\u8981\u6709\u6e90\uff0c\u7ed9\u4ed6\u52a0\u4e0a\u4e00\u4e2a <code>src</code> \u7684\u5c5e\u6027\uff0c\u540c\u65f6\u7ed9\u5b83\u52a0\u4e0a\u4e00\u4e2a <code>resize</code> \u7684\u5c5e\u6027\uff08\u53ef\u4ee5\u914d\u7f6e\u7684\u6709 <code>contain/cover/stretch</code>\uff09</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">@interface WXImageComponent ()</div><div class="line"></div><div class="line">@property (nonatomic, strong) NSString *imageSrc;</div><div class="line">@property (nonatomic, assign) UIViewContentMode resizeMode;</div><div class="line"></div><div class="line">@end</div></pre></td></tr></table></figure>
+<p>component \u4e2d\u6240\u6709\u7684 style\uff0cattribute\uff0cevents \u90fd\u4f1a\u88ab\u4f20\u9012\u5230 Component \u7684\u521d\u59cb\u5316\u65b9\u6cd5\u4e2d\uff0c\u6240\u4ee5\uff0c\u4f60\u53ef\u4ee5\u5728\u521d\u59cb\u5316\u65b9\u6cd5\u4e2d\u5b58\u50a8\u4f60\u611f\u5174\u8da3\u7684\u4e00\u4e9b\u5c5e\u6027\u503c</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">@implementation WXImageComponent</div><div class="line"></div><div class="line">- (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance</div><div class="line">{</div><div class="line"> if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {</div><div class="line"> _imageSrc = [WXConvert NSString:attributes[@"src"]];</div><div class="line"> _resizeMode = [WXConvert UIViewContentMode:attributes[@"resize"]];</div><div class="line">}</div><div class="line"></div><div class="line"> return self;</div><div class="line">}</div><div class="line"></div><div class="line">@end</div></pre></td></tr></table></figure>
+<p>attribute \u4e2d\u62ff\u5230\u7684\u503c\u7684\u7c7b\u578b\u90fd\u662f <code>id</code>\uff0c\u6211\u4eec\u53ef\u4ee5\u7528\u8f6c\u6362\u65b9\u6cd5\u628a\u5b83\u8f6c\u6362\u5230\u4efb\u4f55\u503c\u3002Weex SDK \u63d0\u4f9b\u4e86\u4e00\u4e9b\u57fa\u7840\u7684\u8f6c\u6362\u65b9\u6cd5\uff0c\u53ef\u4ee5\u53c2\u8003 <code>WXConvert</code> \u7c7b\uff0c\u6216\u8005\u4f60\u53ef\u4ee5\u6dfb\u52a0\u81ea\u5df1\u7684\u8f6c\u6362\u51fd\u6570\u3002</p>
+<h3 id="Hooking-\u6e32\u67d3\u751f\u547d\u5468\u671f"><a href="#Hooking-\u6e32\u67d3\u751f\u547d\u5468\u671f" class="headerlink" title="Hooking \u6e32\u67d3\u751f\u547d\u5468\u671f"></a>Hooking \u6e32\u67d3\u751f\u547d\u5468\u671f</h3><p>native \u7684 component \u662f\u7531 Weex \u7ba1\u7406\u7684\uff0cWeex \u521b\u5efa\uff0c\u5e03\u5c40\uff0c\u6e32\u67d3\uff0c\u9500\u6bc1\u3002Weex \u7684 component \u751f\u547d\u5468\u671f\u90fd\u662f\u53ef\u4ee5 hook \u7684\uff0c\u4f60\u53ef\u4ee5\u5728\u8fd9\u4e9b\u751f\u547d\u5468\u671f\u4e2d\u53bb\u505a\u81ea\u5df1\u7684\u4e8b\u60c5\u3002</p>
+<table>
+<thead>
+<tr>
+<th style="text-align:center">\u65b9\u6cd5</th>
+<th>\u63cf\u8ff0</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td style="text-align:center">initWithRef:type:\u2026</td>
+<td>\u7528\u7ed9\u5b9a\u7684\u5c5e\u6027\u521d\u59cb\u5316\u4e00\u4e2acomponent.</td>
+</tr>
+<tr>
+<td style="text-align:center">layoutDidFinish</td>
+<td>\u5728component\u5b8c\u6210\u5e03\u5c40\u65f6\u5019\u4f1a\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">loadView</td>
+<td>\u521b\u5efacomponent\u7ba1\u7406\u7684view.</td>
+</tr>
+<tr>
+<td style="text-align:center">viewWillLoad</td>
+<td>\u5728component\u7684view\u52a0\u8f7d\u4e4b\u524d\u4f1a\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">viewDidLoad</td>
+<td>\u5728component\u7684view\u52a0\u8f7d\u5b8c\u4e4b\u540e\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">viewWillUnload</td>
+<td>\u5728component\u7684view\u88ab\u91ca\u653e\u4e4b\u524d\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">viewDidUnload</td>
+<td>\u5728component\u7684view\u88ab\u91ca\u653e\u4e4b\u540e\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">updateStyles:</td>
+<td>\u5728component\u7684style\u66f4\u65b0\u65f6\u5019\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">updateAttributes:</td>
+<td>\u5728component\u7684attribute\u66f4\u65b0\u65f6\u5019\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">addEvent:</td>
+<td>\u7ed9component\u6dfb\u52a0event\u7684\u65f6\u5019\u8c03\u7528.</td>
+</tr>
+<tr>
+<td style="text-align:center">removeEvent:</td>
+<td>\u5728event\u79fb\u9664\u7684\u65f6\u5019\u8c03\u7528.</td>
+</tr>
+</tbody>
+</table>
+<p>\u5728 image component \u7684\u4f8b\u5b50\u91cc\u9762\uff0c\u5982\u679c\u6211\u4eec\u9700\u8981\u6211\u4eec\u81ea\u5df1\u7684 image view \u7684\u8bdd\uff0c\u53ef\u4ee5\u590d\u5199 <code>loadView</code>\u8fd9\u4e2a\u65b9\u6cd5.</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">- (UIView *)loadView</div><div class="line">{</div><div class="line">return [[WXImageView alloc] init];</div><div class="line">}</div></pre></td></tr></table></figure>
+<p>\u73b0\u5728\u6211\u4eec\u4f7f\u7528 <code>WXImageView</code> \u6e32\u67d3 <code>image</code> component\u3002<br>\u4f5c\u4e3a\u4e00\u4e2a image component\uff0c\u6211\u4eec\u9700\u8981\u62ff\u5230\u670d\u52a1\u5668\u56fe\u7247\uff0c\u800c\u4e14\u628a\u5b83\u8bbe\u7f6e\u8fdb image view \u91cc. \u8fd9\u4e2a\u64cd\u4f5c\u53ef\u4ee5\u5728 <code>viewDidLoad</code> \u65b9\u6cd5\u4e2d\u505a\uff0c\u8fd9\u4e2a\u65b9\u6cd5\u662f\u5728 view \u5df2\u7ecf\u88ab\u521b\u5efa\u800c\u4e14\u52a0\u8f7d\u4e86\u65f6\u5019 Weex SDK \u4f1a\u8c03\u7528\u5230\uff0c\u800c\u4e14 <code>viewDidLoad</code> \u8fd9\u4e2a\u65b9\u6cd5\u662f\u4f60\u505a\u989d\u5916\u521d\u59cb\u5316\u5de5\u4f5c\u6bd4\u5982\u6539\u53d8 content mode(\u4e5f\u5c31\u662f\u8bbe\u7f6eresize) \u7684\u6700\u597d\u65f6\u95f4.</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">- (void)viewDidLoad</div><div class="line">{</div><div class="line"> UIImageView *imageView = (UIImageView *)self.view;</div><div class="line"> imageView.contentMode = _resizeMode;</div><div class="line"> imageView.userInteractionEnabled = YES;</div><div class="line"> imageView.clipsToBounds = YES;</div><div class="line"> imageView.exclusiveTouch = YES;</div><div class="line"></div><div class="line"> // Do your image fetching and updating logic</div><div class="line">}</div></pre></td></tr></table></figure>
+<p>\u5982\u679c\u53ef\u4ee5\u6539\u53d8 image \u7684 src\uff0c\u4e5f\u53ef\u4ee5 hook <code>updateAttributes:</code> \u65b9\u6cd5\u6765\u505a\u5c5e\u6027\u66f4\u65b0\u64cd\u4f5c\uff0c\u5f53 <code>updateAttributes:</code> \u6216\u8005 <code>updateStyles:</code> \u88ab\u8c03\u7528\u7684\u65f6\u5019\uff0c component \u7684 view \u5df2\u7ecf\u52a0\u8f7d\u5b8c\u6210</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">- (void)updateAttributes:(NSDictionary *)attributes</div><div class="line">{</div><div class="line"> if (attributes[@"src"]) {</div><div class="line"> _imageSrc = [WXConvert NSString:attributes[@"src"]];</div><div class="line"> // Do your image updating logic</div><div class="line"> }</div><div class="line"></div><div class="line"> if (attributes[@"resize"]) {</div><div class="line"> _resizeMode = [WXConvert UIViewContentMode:attributes[@"resize"]];</div><div class="line"> self.view.contentMode = _resizeMode;</div><div class="line"> }</div><div class="line">}</div></pre></td></tr></table></figure>
+<p>\u6216\u8bb8\u4f60\u9700\u8981\u8003\u8651\u66f4\u591a\u7684\u751f\u547d\u5468\u671f\u65b9\u6cd5\u53bb Hook\uff0c\u5f53\u5e03\u5c40\u5b8c\u6210\u65f6\u5019\uff0c\u50cf <code>layoutDidFinish</code>\uff0c\u5982\u679c\u4f60\u60f3\u4e86\u89e3\u66f4\u591a\uff0c\u53ef\u4ee5\u53c2\u8003\u4e00\u4e0b<code>WXComponent.h</code> \u58f0\u660e\u7684\u65b9\u6cd5\u3002</p>
+<p>\u73b0\u5728\u4f60\u53ef\u4ee5\u7528\u5728\u4efb\u4f55 <code>.we</code> \u6587\u4ef6\u91cc\u9762\u4f7f\u7528 <code><image></code>\uff0c\u800c\u4e14\u53ef\u4ee5\u52a0\u4e0a image \u7684\u5c5e\u6027\u3002</p>
+<figure class="highlight html"><table><tr><td class="code"><pre><div class="line"><span class="tag"><<span class="name">image</span> <span class="attr">style</span>=<span class="string">"your-custom-style"</span> <span class="attr">src</span>=<span class="string">"image-remote-source"</span> <span class="attr">resize</span>=<span class="string">"contain/cover/stretch"</span>></span><span class="tag"></<span class="name">image</span>></span></div></pre></td></tr></table></figure>
+<h5 id="component-\u65b9\u6cd5"><a href="#component-\u65b9\u6cd5" class="headerlink" title="component \u65b9\u6cd5"></a>component \u65b9\u6cd5</h5><p>WeexSDK 0.9.5 \u4e4b\u540e\u652f\u6301\u4e86\u5728 js \u4e2d\u76f4\u63a5\u8c03\u7528 component \u7684\u65b9\u6cd5\uff0c\u8fd9\u91cc\u63d0\u4f9b\u4e00\u4e2a\u4f8b\u5b50</p>
+<ul>
+<li><p>\u81ea\u5b9a\u4e49\u4e00\u4e2a WXMyCompoenent \u7684\u7ec4\u4ef6</p>
+<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">@implementation WXMyComponent</div><div class="line">WX_EXPORT_METHOD(@selector(focus)) // \u66b4\u9732\u8be5\u65b9\u6cd5\u7ed9js</div><div class="line">- (instancetype)initWithRef:(NSString *)ref type:(NSString *)type styles:(NSDictionary *)styles attributes:(NSDictionary *)attributes events:(NSArray *)events weexInstance:(WXSDKInstance *)weexInstance</div><div class="line">{</div><div class="line"> if (self = [super initWithRef:ref type:type styles:styles attributes:attributes events:events weexInstance:weexInstance]) {</div><div class="line"> // handle your attributes</div><div class="line"> // handle your styles</div><div class="line"> }</div><div class="line"> </div><div class="line"> return self;</div><div class="line">}</div><div class="line"></div><div class="line">- (void)focus</div><div class="line">{</div><div class="line"> NSLog(@"you got it");
</div><div class="line">}</div><div class="line">@end</div></pre></td></tr></table></figure>
+</li>
+</ul>
+<ul>
+<li><p>\u6ce8\u518c\u7ec4\u4ef6 <code>[WXSDKEngine registerComponent:@"mycomponent" withClass:[WXMyComponent class]]</code></p>
+</li>
+<li><p>\u5728 weex \u6587\u4ef6\u4e2d\u8c03\u7528</p>
+<pre><code class="html"><span class="tag"><<span class="name">template</span>></span>
+ <span class="tag"><<span class="name">mycomponent</span> <span class="attr">id</span>=<span class="string">'mycomponent'</span>></span><span class="tag"></<span class="name">mycomponent</span>></span>
+<span class="tag"></<span class="name">template</span>></span>
+<span class="tag"><<span class="name">script</span>></span><span class="javascript">
+ <span class="built_in">module</span>.exports = {
+ <span class="attr">created</span>:<span class="function"><span class="keyword">function</span>(<span class="params"></span>) </span>{
+ <span class="keyword">this</span>.$el(<span class="string">'mycomponent'</span>).focus();
+ }
+ }
+</span><span class="tag"></<span class="name">script</span>></span>
+</code></pre>
+</li>
+</ul>
+
+ </div>
+
+</article>
+</div>
+
+ <footer id="footer">
+ <div class="row clearfix">
+ <div class="ali-logo">
+ <img src="//gw.alicdn.com/tps/TB1Ef93PXXXXXaXXpXXXXXXXXXX-252-126.png" alt="Alibaba">
+ </div>
+ <div class="dropdown select-lang">
+ <a href="javascript:;" class="dropdown-toggle">
+ Language
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu pick-lang">
+ <li>
+ <a href="/references/advanced/extend-to-ios.html" data-lang="en">English</a>
+ </li>
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" data-lang="zh-cn">\u4e2d\u6587</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="row">
+ <p><span>Released under </span><a href="">Apache License 2.0</a></p>
+ </div>
+ <div class="row clearfix">
+ <div class="cell"><span>Copyright(c) 2016 </span><a href="https://www.alibaba.com">Alibaba</a></div>
+ <div class="cell"><span>Designed by </span><a href="">\u963f\u91cc\u4e91UED AX</a></div>
+ </div>
+</footer>
+ <div style="display: none;">
+ <script src="//s95.cnzz.com/z_stat.php?id=1261102667&web_id=1261102667" language="JavaScript"></script>
+</div>
+
+ <script src="/js/reqwest.js"></script>
+ <script src="/js/common.js"></script>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-weex-site/blob/95bb2077/cn/references/advanced/index.html
----------------------------------------------------------------------
diff --git a/cn/references/advanced/index.html b/cn/references/advanced/index.html
new file mode 100644
index 0000000..f2d32f4
--- /dev/null
+++ b/cn/references/advanced/index.html
@@ -0,0 +1,1388 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset="utf-8">
+
+ <title>\u9ad8\u9636\u77e5\u8bc6 | Weex</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+ <meta name="description" content="\u9ad8\u9636\u77e5\u8bc6
+iOS \u6269\u5c55
+Android \u6269\u5c55
+HTML5 \u6269\u5c55
+JS framework \u6269\u5c55
+\u96c6\u6210 Devtools \u5230 Android
+\u96c6\u6210 Devtools \u5230 iOS">
+<meta property="og:type" content="website">
+<meta property="og:title" content="\u9ad8\u9636\u77e5\u8bc6">
+<meta property="og:url" content="https://weex.apache.org/cn/references/advanced/index.html">
+<meta property="og:site_name" content="Weex">
+<meta property="og:description" content="\u9ad8\u9636\u77e5\u8bc6
+iOS \u6269\u5c55
+Android \u6269\u5c55
+HTML5 \u6269\u5c55
+JS framework \u6269\u5c55
+\u96c6\u6210 Devtools \u5230 Android
+\u96c6\u6210 Devtools \u5230 iOS">
+<meta property="og:updated_time" content="2017-03-08T06:01:31.000Z">
+<meta name="twitter:card" content="summary">
+<meta name="twitter:title" content="\u9ad8\u9636\u77e5\u8bc6">
+<meta name="twitter:description" content="\u9ad8\u9636\u77e5\u8bc6
+iOS \u6269\u5c55
+Android \u6269\u5c55
+HTML5 \u6269\u5c55
+JS framework \u6269\u5c55
+\u96c6\u6210 Devtools \u5230 Android
+\u96c6\u6210 Devtools \u5230 iOS">
+
+ <link rel="alternate" href="/atom.xml" title="Weex" type="application/atom+xml">
+
+
+ <link rel="icon" href="//gw.alicdn.com/tps/TB1XNqxPXXXXXcSXVXXXXXXXXXX-64-63.png">
+
+
+ <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
+
+ <link rel="stylesheet" href="/css/style.css">
+ <link rel="stylesheet" href="/css/swiper.min.css">
+</head>
+
+<body id="references" class="lang-cn">
+
+ <script>
+ window.PAGE_TYPE = "references";
+ window.ROOT = "/"
+ </script>
+ <header id="header">
+ <div class="navbar">
+ <a id="logo" href="/cn/">
+ <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+ </a>
+ <div class="main-nav">
+ <ul class="links">
+ <li><a href="/cn/guide">\u6559\u7a0b</a></li>
+ <li><a href="/cn/references">\u624b\u518c</a></li>
+ <li><a href="/cn/faq.html">FAQ</a></li>
+ <li class="dropdown">
+ <a href="javascript:;">\u4e0b\u8f7d</a>
+ <ul class="dropdown-menu subnav">
+ <li>
+ <a href="/cn/playground.html">Playground</a>
+ </li>
+ <li>
+ <a href="https://www.npmjs.com/package/weex-devtool" target="_blank">Devtool</a>
+ </li>
+ <li>
+ <a href="https://www.npmjs.com/package/weexpack" target="_blank">Weexpack</a>
+ </li>
+ <li>
+ <a href="http://dotwe.org" target="_blank">Snippets</a>
+ </li>
+ <li>
+ <a href="https://market.weex-project.io/" target="_blank">Market</a>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <ul class="info">
+ <li><a href="https://github.com/alibaba/weex/" target="_blank"><span class="btn-github iconfont icon-github"></span></a></li>
+ </ul>
+ <ul class="tools">
+ <li>
+ <div class="search">
+ <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+ <input type="text" id="search-input-header" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+ <span class="iconfont icon-search"></span>
+ </form>
+ <div class="results-panel">
+ </div>
+</div>
+ </li>
+ <li>
+ <div class="dropdown select-lang">
+ <a href="javascript:;" class="dropdown-toggle">
+ Language
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu pick-lang">
+ <li>
+ <a href="/references/advanced/index.html" data-lang="en">English</a>
+ </li>
+ <li>
+ <a href="/cn/references/advanced/index.html" data-lang="zh-cn">\u4e2d\u6587</a>
+ </li>
+ </ul>
+ </div>
+ </li>
+ <!--<li></li>-->
+ </ul>
+ </div>
+ </div>
+ <div id="mobile-nav">
+ <a id="logo" href="/cn/">
+ <img src="//img.alicdn.com/tps/TB1zBLaPXXXXXXeXXXXXXXXXXXX-121-59.svg" />
+ </a>
+ <a class="btn-menu"><span class="iconfont icon-nav"></span></a>
+ </div>
+</header>
+ <div id="sidebar" class="">
+ <div class="sidebar-menu">
+
+ <div class="search">
+ <form id="search-form" class="search-form"> <!-- \u641c\u7d22\u6846\u76f8\u5173 -->
+ <input type="text" id="search-input-sidebar" name="q" results="0" class="form-control search-input" autocomplete="off" autocorrect="off"/>
+ <span class="iconfont icon-search"></span>
+ </form>
+ <div class="results-panel">
+ </div>
+</div>
+
+
+
+<div class="summary">
+ <h2 class="part-title">
+
+ \u624b\u518c
+
+ </h2>
+ <ul class="doc-summary">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">\u901a\u7528\u7279\u6027</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/common-style.html" class="sidebar-link ">\u901a\u7528\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/text-style.html" class="sidebar-link ">\u6587\u672c\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/color-names.html" class="sidebar-link ">\u989c\u8272\u540d\u79f0\u5217\u8868</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/gesture.html" class="sidebar-link ">\u624b\u52bf</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/path.html" class="sidebar-link ">Path (\u82f1)</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">\u5185\u5efa\u7ec4\u4ef6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/components/a.html" class="sidebar-link "><a></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/text.html" class="sidebar-link "><text></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/video.html" class="sidebar-link "><video></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/web.html" class="sidebar-link "><web></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/div.html" class="sidebar-link "><div></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/image.html" class="sidebar-link "><image></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/input.html" class="sidebar-link "><input></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/list.html" class="sidebar-link "><list></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">\u5185\u5efa\u6a21\u5757</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS \u5355\u4f4d</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">\u901a\u7528\u4e8b\u4ef6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex \u5b9e\u4f8b\u53d8\u91cf</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web \u6807\u51c6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x \u5728 Weex \u548c Web \u4e2d\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">\u4f7f\u7528 Vuex \u548c vue-router</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link current ">\u9ad8\u9636\u77e5\u8bc6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">\u62d3\u5c55 JS framework</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 Android</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 iOS</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">\u8fc1\u79fb</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex \u548c Web \u5e73\u53f0\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">\u5982\u4f55\u5c06\u539f\u6709 Weex \u9879\u76ee\u6539\u9020\u6210 Vue \u7248\u672c</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex \u548c Vue 2.x \u7684\u8bed\u6cd5\u5dee\u5f02</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">\u65e7\u8bed\u6cd5\u6587\u6863</a></h3>
+ </li>
+
+ </ul>
+</div>
+
+ <a class="btn-close-sidebar iconfont icon-close"></a>
+ </div>
+</div>
+ <div class="article-wrapper page-layout">
+ <div class="doc-nav">
+
+
+
+<div class="summary">
+ <h2 class="part-title">
+
+ \u624b\u518c
+
+ </h2>
+ <ul class="doc-summary">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/index.html" class="sidebar-link ">\u901a\u7528\u7279\u6027</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/ios-apis.html" class="sidebar-link ">iOS APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/android-apis.html" class="sidebar-link ">Android APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/html5-apis.html" class="sidebar-link ">HTML5 APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/jsfm-apis.html" class="sidebar-link ">JS Framework APIs</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/common-style.html" class="sidebar-link ">\u901a\u7528\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/text-style.html" class="sidebar-link ">\u6587\u672c\u6837\u5f0f</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/color-names.html" class="sidebar-link ">\u989c\u8272\u540d\u79f0\u5217\u8868</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/gesture.html" class="sidebar-link ">\u624b\u52bf</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/path.html" class="sidebar-link ">Path (\u82f1)</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/components/index.html" class="sidebar-link ">\u5185\u5efa\u7ec4\u4ef6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/components/a.html" class="sidebar-link "><a></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/slider.html" class="sidebar-link "><slider></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/indicator.html" class="sidebar-link "><indicator></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/switch.html" class="sidebar-link "><switch></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/text.html" class="sidebar-link "><text></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/textarea.html" class="sidebar-link "><textarea></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/video.html" class="sidebar-link "><video></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/web.html" class="sidebar-link "><web></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/div.html" class="sidebar-link "><div></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/image.html" class="sidebar-link "><image></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/input.html" class="sidebar-link "><input></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/list.html" class="sidebar-link "><list></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/cell.html" class="sidebar-link "><cell></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/loading.html" class="sidebar-link "><loading></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/refresh.html" class="sidebar-link "><refresh></a>
+ </li>
+
+ <li>
+ <a href="/cn/references/components/scroller.html" class="sidebar-link "><scroller></a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/modules/index.html" class="sidebar-link ">\u5185\u5efa\u6a21\u5757</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/modules/animation.html" class="sidebar-link ">animation</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/websocket.html" class="sidebar-link ">WebSocket</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/picker.html" class="sidebar-link ">picker</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/clipboard.html" class="sidebar-link ">clipboard</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/dom.html" class="sidebar-link ">dom</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/modal.html" class="sidebar-link ">modal</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/navigator.html" class="sidebar-link ">navigator</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/storage.html" class="sidebar-link ">storage</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/stream.html" class="sidebar-link ">stream</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/webview.html" class="sidebar-link ">webview</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/modules/globalevent.html" class="sidebar-link ">globalEvent</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/unit.html" class="sidebar-link ">CSS \u5355\u4f4d</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/common-event.html" class="sidebar-link ">\u901a\u7528\u4e8b\u4ef6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/native-dom-api.html" class="sidebar-link ">Native DOM APIs</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/weex-variable.html" class="sidebar-link ">Weex \u5b9e\u4f8b\u53d8\u91cf</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/web-standards.html" class="sidebar-link ">Web \u6807\u51c6</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/js-service/index.html" class="sidebar-link ">JS Service</a></h3>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/vue/index.html" class="sidebar-link ">Vue</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/vue/difference-with-web.html" class="sidebar-link ">Vue 2.x \u5728 Weex \u548c Web \u4e2d\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/vue/difference-of-vuex.html" class="sidebar-link ">\u4f7f\u7528 Vuex \u548c vue-router</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/advanced/index.html" class="sidebar-link current ">\u9ad8\u9636\u77e5\u8bc6</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-ios.html" class="sidebar-link ">iOS \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-android.html" class="sidebar-link ">Android \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-to-html5.html" class="sidebar-link ">HTML5 \u6269\u5c55</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/extend-jsfm.html" class="sidebar-link ">\u62d3\u5c55 JS framework</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-android.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 Android</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/advanced/integrate-devtool-to-ios.html" class="sidebar-link ">\u96c6\u6210 Devtools \u5230 iOS</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/references/migration/index.html" class="sidebar-link ">\u8fc1\u79fb</a></h3>
+
+ <ul class="chapter">
+
+ <li>
+ <a href="/cn/references/platform-difference.html" class="sidebar-link ">Weex \u548c Web \u5e73\u53f0\u7684\u5dee\u5f02</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/migration-from-weex.html" class="sidebar-link ">\u5982\u4f55\u5c06\u539f\u6709 Weex \u9879\u76ee\u6539\u9020\u6210 Vue \u7248\u672c</a>
+ </li>
+
+ <li>
+ <a href="/cn/references/migration/difference.html" class="sidebar-link ">Weex \u548c Vue 2.x \u7684\u8bed\u6cd5\u5dee\u5f02</a>
+ </li>
+
+ </ul>
+
+ </li>
+
+
+
+ <li>
+ <h3 class="chapter-title"><a href="/cn/v-0.10/references/index.html" class="sidebar-link">\u65e7\u8bed\u6cd5\u6587\u6863</a></h3>
+ </li>
+
+ </ul>
+</div>
+ </div>
+
+
+<article class="article article-type-references">
+ <div class="article-entry" itemprop="articleBody">
+ <header class="article-header">
+
+
+ <h1 class="article-title" itemprop="name">
+ \u9ad8\u9636\u77e5\u8bc6
+ </h1>
+
+
+ <time class="article-date" datetime="2017-03-08T06:01:31.000Z">Updated time: 08/03/2017</time>
+</header>
+ <h1 id="\u9ad8\u9636\u77e5\u8bc6"><a href="#\u9ad8\u9636\u77e5\u8bc6" class="headerlink" title="\u9ad8\u9636\u77e5\u8bc6"></a>\u9ad8\u9636\u77e5\u8bc6</h1><ul>
+<li><a href="./extend-to-ios.html">iOS \u6269\u5c55</a></li>
+<li><a href="./extend-to-android.html">Android \u6269\u5c55</a></li>
+<li><a href="./extend-to-html5.html">HTML5 \u6269\u5c55</a></li>
+<li><a href="./extend-jsfm.html">JS framework \u6269\u5c55</a></li>
+<li><a href="./integrate-devtool-to-android.html">\u96c6\u6210 Devtools \u5230 Android</a></li>
+<li><a href="./integrate-devtool-to-ios.html">\u96c6\u6210 Devtools \u5230 iOS</a></li>
+</ul>
+
+ </div>
+
+</article>
+</div>
+
+ <footer id="footer">
+ <div class="row clearfix">
+ <div class="ali-logo">
+ <img src="//gw.alicdn.com/tps/TB1Ef93PXXXXXaXXpXXXXXXXXXX-252-126.png" alt="Alibaba">
+ </div>
+ <div class="dropdown select-lang">
+ <a href="javascript:;" class="dropdown-toggle">
+ Language
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu pick-lang">
+ <li>
+ <a href="/references/advanced/index.html" data-lang="en">English</a>
+ </li>
+ <li>
+ <a href="/cn/references/advanced/index.html" data-lang="zh-cn">\u4e2d\u6587</a>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div class="row">
+ <p><span>Released under </span><a href="">Apache License 2.0</a></p>
+ </div>
+ <div class="row clearfix">
+ <div class="cell"><span>Copyright(c) 2016 </span><a href="https://www.alibaba.com">Alibaba</a></div>
+ <div class="cell"><span>Designed by </span><a href="">\u963f\u91cc\u4e91UED AX</a></div>
+ </div>
+</footer>
+ <div style="display: none;">
+ <script src="//s95.cnzz.com/z_stat.php?id=1261102667&web_id=1261102667" language="JavaScript"></script>
+</div>
+
+ <script src="/js/reqwest.js"></script>
+ <script src="/js/common.js"></script>
+</body>
+</html>