mn-docs-mcp 0.6.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/astro.config.mjs +4 -0
- package/package.json +1 -1
- package/src/content/docs/guides/contributing.md +4 -4
- package/src/content/docs/guides/getting-started.md +2 -2
- package/src/content/docs/guides/lifecycle-and-window.md +4 -4
- package/src/content/docs/guides/mindmap-and-selection.md +1 -1
- package/src/content/docs/guides/native-ui.md +2 -2
- package/src/content/docs/guides/network-requests.md +7 -8
- package/src/content/docs/guides/notes-and-database.md +1 -1
- package/src/content/docs/guides/shortcut-keys.md +9 -9
- package/src/content/docs/guides/storage-and-files.md +3 -3
- package/src/content/docs/guides/toolbar-and-commands.md +1 -1
- package/src/content/docs/reference/black-box.md +2 -2
- package/src/content/docs/reference/foundation/ns-attributed-string.md +1 -1
- package/src/content/docs/reference/foundation/ns-counted-set.md +1 -1
- package/src/content/docs/reference/foundation/ns-date-components.md +2 -2
- package/src/content/docs/reference/foundation/ns-date-formatter.md +1 -3
- package/src/content/docs/reference/foundation/ns-decimal-number.md +1 -1
- package/src/content/docs/reference/foundation/ns-enumerator.md +1 -1
- package/src/content/docs/reference/foundation/ns-error.md +2 -2
- package/src/content/docs/reference/foundation/ns-file-manager.md +1 -1
- package/src/content/docs/reference/foundation/ns-formatter.md +2 -2
- package/src/content/docs/reference/foundation/ns-json-serialization.md +10 -2
- package/src/content/docs/reference/foundation/ns-mutable-attributed-string.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-character-set.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-dictionary.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-index-set.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-set.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-string.md +1 -1
- package/src/content/docs/reference/foundation/ns-mutable-url-request.md +2 -3
- package/src/content/docs/reference/foundation/ns-null.md +1 -1
- package/src/content/docs/reference/foundation/ns-number-formatter.md +2 -2
- package/src/content/docs/reference/foundation/ns-operation.md +2 -2
- package/src/content/docs/reference/foundation/ns-pointer-array.md +1 -1
- package/src/content/docs/reference/foundation/ns-proxy.md +5 -3
- package/src/content/docs/reference/foundation/ns-scanner.md +7 -1
- package/src/content/docs/reference/foundation/ns-set.md +1 -1
- package/src/content/docs/reference/foundation/ns-simple-c-string.md +3 -4
- package/src/content/docs/reference/foundation/ns-time-zone.md +1 -1
- package/src/content/docs/reference/foundation/ns-timer.md +1 -1
- package/src/content/docs/reference/foundation/ns-ubiquitous-key-value-store.md +61 -0
- package/src/content/docs/reference/foundation/ns-url-connection.md +2 -2
- package/src/content/docs/reference/foundation/ns-url-request.md +2 -2
- package/src/content/docs/reference/foundation/ns-url-response.md +5 -5
- package/src/content/docs/reference/foundation/ns-url.md +1 -1
- package/src/content/docs/reference/foundation/ns-user-defaults.md +4 -4
- package/src/content/docs/reference/foundation/ns-value.md +15 -15
- package/src/content/docs/reference/global/agent-tools.md +91 -0
- package/src/content/docs/reference/global/application.md +5 -5
- package/src/content/docs/reference/global/builtin-commands.md +2 -2
- package/src/content/docs/reference/global/database.md +4 -4
- package/src/content/docs/reference/global/document.md +21 -0
- package/src/content/docs/reference/global/global-variables.md +22 -5
- package/src/content/docs/reference/global/jsb.md +7 -5
- package/src/content/docs/reference/global/note.md +5 -5
- package/src/content/docs/reference/global/notebook.md +21 -0
- package/src/content/docs/reference/global/popup-menu-item.md +2 -2
- package/src/content/docs/reference/global/popup-menu.md +5 -6
- package/src/content/docs/reference/global/search-manager.md +12 -6
- package/src/content/docs/reference/global/self.md +1 -13
- package/src/content/docs/reference/js-runtime.md +6 -5
- package/src/content/docs/reference/marginnote/document-controller.md +41 -9
- package/src/content/docs/reference/marginnote/jsextension.md +7 -7
- package/src/content/docs/reference/marginnote/mb-book-note.md +123 -30
- package/src/content/docs/reference/marginnote/mb-book.md +6 -6
- package/src/content/docs/reference/marginnote/mb-model-tool.md +2 -2
- package/src/content/docs/reference/marginnote/mb-topic.md +18 -7
- package/src/content/docs/reference/marginnote/mindmap-node.md +4 -4
- package/src/content/docs/reference/marginnote/mindmap-view.md +2 -2
- package/src/content/docs/reference/marginnote/notebook-controller.md +3 -3
- package/src/content/docs/reference/marginnote/outline-view.md +2 -2
- package/src/content/docs/reference/marginnote/reader-controller.md +3 -3
- package/src/content/docs/reference/marginnote/study-controller.md +6 -6
- package/src/content/docs/reference/quartzcore/caanimation-group.md +3 -3
- package/src/content/docs/reference/quartzcore/cabasic-animation.md +3 -3
- package/src/content/docs/reference/quartzcore/caemitter-layer.md +44 -0
- package/src/content/docs/reference/quartzcore/cagradient-layer.md +1 -1
- package/src/content/docs/reference/quartzcore/cakeyframe-animation.md +3 -3
- package/src/content/docs/reference/quartzcore/calayer.md +1 -1
- package/src/content/docs/reference/quartzcore/camedia-timing-function.md +1 -1
- package/src/content/docs/reference/quartzcore/caproperty-animation.md +1 -1
- package/src/content/docs/reference/quartzcore/careplicator-layer.md +2 -2
- package/src/content/docs/reference/quartzcore/cascroll-layer.md +1 -1
- package/src/content/docs/reference/quartzcore/cashape-layer.md +2 -2
- package/src/content/docs/reference/quartzcore/catext-layer.md +4 -4
- package/src/content/docs/reference/quartzcore/catransaction.md +5 -3
- package/src/content/docs/reference/quartzcore/catransform-layer.md +3 -3
- package/src/content/docs/reference/quartzcore/catransition.md +10 -6
- package/src/content/docs/reference/quartzcore/cavalue-function.md +1 -1
- package/src/content/docs/reference/uikit/ns-mutable-paragraph-style.md +3 -3
- package/src/content/docs/reference/uikit/ns-paragraph-style.md +3 -4
- package/src/content/docs/reference/uikit/ns-text-storage.md +4 -5
- package/src/content/docs/reference/uikit/uiactivity-indicator-view.md +2 -2
- package/src/content/docs/reference/uikit/uiapplication.md +1 -1
- package/src/content/docs/reference/uikit/uibar-button-item.md +3 -4
- package/src/content/docs/reference/uikit/uibar-item.md +2 -3
- package/src/content/docs/reference/uikit/uibezier-path.md +2 -2
- package/src/content/docs/reference/uikit/uibutton.md +1 -1
- package/src/content/docs/reference/uikit/uicollection-view-cell.md +5 -5
- package/src/content/docs/reference/uikit/uicollection-view-controller.md +22 -2
- package/src/content/docs/reference/uikit/uicollection-view-flow-layout.md +54 -0
- package/src/content/docs/reference/uikit/uicollection-view-layout.md +9 -2
- package/src/content/docs/reference/uikit/uicollection-view.md +13 -4
- package/src/content/docs/reference/uikit/uicolor.md +1 -1
- package/src/content/docs/reference/uikit/uicontrol.md +3 -5
- package/src/content/docs/reference/uikit/uidate-picker.md +1 -1
- package/src/content/docs/reference/uikit/uievent.md +2 -2
- package/src/content/docs/reference/uikit/uifont.md +1 -1
- package/src/content/docs/reference/uikit/uigesture-recognizer.md +1 -1
- package/src/content/docs/reference/uikit/uiimage-picker-controller.md +1 -1
- package/src/content/docs/reference/uikit/uiimage-view.md +2 -2
- package/src/content/docs/reference/uikit/uiimage.md +2 -2
- package/src/content/docs/reference/uikit/uikey-command.md +2 -2
- package/src/content/docs/reference/uikit/uilabel.md +3 -3
- package/src/content/docs/reference/uikit/uilocal-notification.md +2 -2
- package/src/content/docs/reference/uikit/uilong-press-gesture-recognizer.md +2 -2
- package/src/content/docs/reference/uikit/uinavigation-bar.md +2 -2
- package/src/content/docs/reference/uikit/uinavigation-controller.md +1 -1
- package/src/content/docs/reference/uikit/uinavigation-item.md +1 -1
- package/src/content/docs/reference/uikit/uipage-control.md +1 -1
- package/src/content/docs/reference/uikit/uipage-view-controller.md +1 -1
- package/src/content/docs/reference/uikit/uipan-gesture-recognizer.md +1 -1
- package/src/content/docs/reference/uikit/uipasteboard.md +1 -1
- package/src/content/docs/reference/uikit/uipicker-view.md +3 -3
- package/src/content/docs/reference/uikit/uipinch-gesture-recognizer.md +1 -1
- package/src/content/docs/reference/uikit/uipopover-controller.md +1 -1
- package/src/content/docs/reference/uikit/uiresponder.md +3 -4
- package/src/content/docs/reference/uikit/uirotation-gesture-recognizer.md +1 -1
- package/src/content/docs/reference/uikit/uiscreen-mode.md +2 -2
- package/src/content/docs/reference/uikit/uiscrollview.md +1 -1
- package/src/content/docs/reference/uikit/uisearch-bar.md +25 -2
- package/src/content/docs/reference/uikit/uisegmented-control.md +1 -1
- package/src/content/docs/reference/uikit/uislider.md +1 -1
- package/src/content/docs/reference/uikit/uiswipe-gesture-recognizer.md +1 -1
- package/src/content/docs/reference/uikit/uiswitch.md +2 -2
- package/src/content/docs/reference/uikit/uitab-bar-controller.md +2 -2
- package/src/content/docs/reference/uikit/uitab-bar-item.md +1 -1
- package/src/content/docs/reference/uikit/uitab-bar.md +1 -1
- package/src/content/docs/reference/uikit/uitable-view-cell.md +6 -6
- package/src/content/docs/reference/uikit/uitable-view-controller.md +1 -1
- package/src/content/docs/reference/uikit/uitable-view.md +3 -3
- package/src/content/docs/reference/uikit/uitap-gesture-recognizer.md +2 -2
- package/src/content/docs/reference/uikit/uitext-input-mode.md +7 -3
- package/src/content/docs/reference/uikit/uitext-position.md +5 -5
- package/src/content/docs/reference/uikit/uitext-range.md +4 -4
- package/src/content/docs/reference/uikit/uitext-view.md +2 -2
- package/src/content/docs/reference/uikit/uitextfield.md +3 -3
- package/src/content/docs/reference/uikit/uitoolbar.md +1 -1
- package/src/content/docs/reference/uikit/uitouch.md +3 -3
- package/src/content/docs/reference/uikit/uiview-controller.md +2 -2
- package/src/content/docs/reference/uikit/uiview.md +5 -5
- package/src/content/docs/reference/uikit/uiwebview.md +5 -5
- package/src/content/docs/reference/uikit/uiwindow.md +2 -2
- package/src/content/docs/reference/utility/menu-controller.md +1 -1
- package/src/content/docs/reference/utility/sqlite-result-set.md +1 -1
- package/src/content/docs/reference/utility/sqlite-statement.md +2 -2
- package/src/content/docs/reference/utility/zip-archive.md +13 -14
- package/src/content/docs/reference/value-sturct.md +105 -0
|
@@ -3,7 +3,7 @@ title: UISearchBar
|
|
|
3
3
|
description: 搜索栏视图。支持占位文本、范围按钮、取消/书签按钮,并可自定义背景与 scope 外观。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UISearchBar
|
|
6
|
+
`UISearchBar`继承自[UIView](/reference/uikit/uiview/),用于输入搜索文本与可选范围筛选。插件通过`delegate`接收编辑、文本变化、按钮点击与scope切换回调。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -47,9 +47,32 @@ description: 搜索栏视图。支持占位文本、范围按钮、取消/书签
|
|
|
47
47
|
| `setScopeBarButtonTitleTextAttributesForState(attributes, state)` | attributes: NSDictionary, state: number | void | 设置 scope 标题文字属性。 |
|
|
48
48
|
| `scopeBarButtonTitleTextAttributesForState(state)` | state: number | NSDictionary \| null | 获取 scope 标题文字属性。 |
|
|
49
49
|
|
|
50
|
+
### Delegate回调
|
|
51
|
+
|
|
52
|
+
以下回调可在`JSB.defineClass`实例方法中实现:
|
|
53
|
+
|
|
54
|
+
| 回调方法名 | 对应selector | 返回值 | 触发时机 |
|
|
55
|
+
| --- | --- | --- | --- |
|
|
56
|
+
| `searchBarShouldBeginEditing` | `searchBarShouldBeginEditing:` | `BOOL` | 即将进入编辑态时触发。 |
|
|
57
|
+
| `searchBarTextDidBeginEditing` | `searchBarTextDidBeginEditing:` | `void` | 已进入编辑态时触发。 |
|
|
58
|
+
| `searchBarShouldEndEditing` | `searchBarShouldEndEditing:` | `BOOL` | 即将结束编辑态时触发。 |
|
|
59
|
+
| `searchBarTextDidEndEditing` | `searchBarTextDidEndEditing:` | `void` | 已结束编辑态时触发。 |
|
|
60
|
+
| `searchBarTextDidChange` | `searchBar:textDidChange:` | `void` | 文本变化后触发。 |
|
|
61
|
+
| `searchBarShouldChangeTextInRangeReplacementText` | `searchBar:shouldChangeTextInRange:replacementText:` | `BOOL` | 文本变更前拦截触发。 |
|
|
62
|
+
| `searchBarSearchButtonClicked` | `searchBarSearchButtonClicked:` | `void` | 点击Search按钮时触发。 |
|
|
63
|
+
| `searchBarCancelButtonClicked` | `searchBarCancelButtonClicked:` | `void` | 点击Cancel按钮时触发。 |
|
|
64
|
+
| `searchBarBookmarkButtonClicked` | `searchBarBookmarkButtonClicked:` | `void` | 点击Bookmark按钮时触发。 |
|
|
65
|
+
| `searchBarResultsListButtonClicked` | `searchBarResultsListButtonClicked:` | `void` | 点击Results按钮时触发。 |
|
|
66
|
+
| `searchBarSelectedScopeButtonIndexDidChange` | `searchBar:selectedScopeButtonIndexDidChange:` | `void` | 切换scope索引时触发。 |
|
|
67
|
+
|
|
68
|
+
**桥接规则:**
|
|
69
|
+
|
|
70
|
+
- 方法名必须与selector正确对应。
|
|
71
|
+
- `should...`回调必须返回`BOOL`。
|
|
72
|
+
|
|
50
73
|
## 类成员 (Class members)
|
|
51
74
|
|
|
52
|
-
|
|
75
|
+
当前接口未额外暴露 `UISearchBar` 的类成员。
|
|
53
76
|
|
|
54
77
|
## 相关
|
|
55
78
|
|
|
@@ -7,7 +7,7 @@ description: 开关控件。
|
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### 属性
|
|
11
11
|
|
|
12
12
|
| 属性 | 类型 | 说明 |
|
|
13
13
|
|------|------|------|
|
|
@@ -15,7 +15,7 @@ description: 开关控件。
|
|
|
15
15
|
|
|
16
16
|
## 类成员 (Class members)
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
当前接口未额外暴露 `UISwitch` 的类成员。
|
|
19
19
|
|
|
20
20
|
## 相关
|
|
21
21
|
|
|
@@ -17,7 +17,7 @@ description: Tab 容器控制器。管理 viewControllers、selectedIndex/select
|
|
|
17
17
|
| `selectedIndex` | number | 当前选中索引。 |
|
|
18
18
|
| `selectedViewController` | UIViewController \| null | 当前选中控制器。 |
|
|
19
19
|
| `moreNavigationController` | UINavigationController | 只读。更多页面的导航控制器。 |
|
|
20
|
-
| `tabBarController` | UITabBarController |
|
|
20
|
+
| `tabBarController` | UITabBarController | 只读。插件环境暴露的 tabBarController 引用。 |
|
|
21
21
|
| `tabBarItem` | UITabBarItem \| null | 自身在更外层容器中的 tabBarItem。 |
|
|
22
22
|
| `delegate` | id | 代理对象。 |
|
|
23
23
|
|
|
@@ -29,7 +29,7 @@ description: Tab 容器控制器。管理 viewControllers、selectedIndex/select
|
|
|
29
29
|
|
|
30
30
|
## 类成员 (Class members)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
当前接口未额外暴露 `UITabBarController` 的类成员。
|
|
33
33
|
|
|
34
34
|
## 相关
|
|
35
35
|
|
|
@@ -3,7 +3,7 @@ title: UITableViewCell
|
|
|
3
3
|
description: 表格单元格。提供 contentView、textLabel/detailTextLabel/imageView,并支持选中/高亮/编辑状态切换。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITableViewCell` 继承自 [UIView](/reference/uikit/uiview/),用于在 [UITableView](/reference/uikit/uitable-view/)
|
|
6
|
+
`UITableViewCell` 继承自 [UIView](/reference/uikit/uiview/),用于在 [UITableView](/reference/uikit/uitable-view/) 中展示一行内容。插件环境暴露了常用的 label/imageView 以及与表格关联的辅助字段。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -25,14 +25,14 @@ description: 表格单元格。提供 contentView、textLabel/detailTextLabel/im
|
|
|
25
25
|
| `indentationWidth` | number | 缩进宽度。 |
|
|
26
26
|
| `selected` | boolean | 是否选中。 |
|
|
27
27
|
| `highlighted` | boolean | 是否高亮。 |
|
|
28
|
-
| `editing` | boolean |
|
|
29
|
-
| `showingDeleteConfirmation` | boolean |
|
|
28
|
+
| `editing` | boolean | 是否编辑态(未完全实现)。 |
|
|
29
|
+
| `showingDeleteConfirmation` | boolean | 只读。是否显示删除确认(未完全实现)。 |
|
|
30
30
|
| `reuseIdentifier` | string | 只读。复用标识符。 |
|
|
31
31
|
| `tintColor` | UIColor \| null | tintColor。 |
|
|
32
|
-
| `showsReorderControl` | boolean |
|
|
32
|
+
| `showsReorderControl` | boolean | 是否显示重排控制(默认值相关)。 |
|
|
33
33
|
| `multiSelView` | UIImageView | 只读。多选视图。 |
|
|
34
|
-
| `indexPath` | NSIndexPath \| null |
|
|
35
|
-
| `tableView` | UITableView \| null |
|
|
34
|
+
| `indexPath` | NSIndexPath \| null | 插件环境附带的 indexPath(便于回调定位)。 |
|
|
35
|
+
| `tableView` | UITableView \| null | 插件环境附带的 tableView 引用。 |
|
|
36
36
|
|
|
37
37
|
### 方法
|
|
38
38
|
|
|
@@ -3,7 +3,7 @@ title: UITableView
|
|
|
3
3
|
description: 表格视图。支持数据刷新、查询可见项、滚动到行,以及 section/row 的批量增删改与复用注册。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITableView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/)
|
|
6
|
+
`UITableView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/),用于展示分组或普通的列表。插件环境默认通过 `dataSource`(以及插件环境实现的 delegate)提供内容,并通过“注册 → 复用”机制创建 cell。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -40,7 +40,7 @@ description: 表格视图。支持数据刷新、查询可见项、滚动到行
|
|
|
40
40
|
| `indexPathForRowAtPoint(point)` | point: { x: number, y: number } | NSIndexPath \| null | 根据点坐标反查行 indexPath。 |
|
|
41
41
|
| `indexPathForCell(cell)` | cell: UITableViewCell | NSIndexPath \| null | 根据 cell 反查 indexPath。 |
|
|
42
42
|
| `indexPathsForRowsInRect(rect)` | rect: { x: number, y: number, width: number, height: number } | NSArray | rect 内行的 indexPath 列表。 |
|
|
43
|
-
| `cellForRowAtIndexPath(indexPath)` | indexPath: NSIndexPath | UITableViewCell \| null | 返回已创建且可见的 cell
|
|
43
|
+
| `cellForRowAtIndexPath(indexPath)` | indexPath: NSIndexPath | UITableViewCell \| null | 返回已创建且可见的 cell(不可见则为 null)。 |
|
|
44
44
|
| `visibleCells()` | — | NSArray | 可见 cell 列表。 |
|
|
45
45
|
| `indexPathsForVisibleRows()` | — | NSArray | 可见行的 indexPath 列表。 |
|
|
46
46
|
| `headerViewForSection(section)` | section: number | UIView \| null | 返回 section header view(可见时)。 |
|
|
@@ -90,7 +90,7 @@ description: 表格视图。支持数据刷新、查询可见项、滚动到行
|
|
|
90
90
|
|
|
91
91
|
## 类成员 (Class members)
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
当前接口未额外暴露 `UITableView` 的类成员。
|
|
94
94
|
|
|
95
95
|
## 相关
|
|
96
96
|
|
|
@@ -11,10 +11,10 @@ description: 点击手势识别器。
|
|
|
11
11
|
|
|
12
12
|
## 类成员 (Class members)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
当前接口未额外暴露 `UITapGestureRecognizer` 的类成员。
|
|
15
15
|
|
|
16
16
|
## 提示
|
|
17
17
|
|
|
18
18
|
- 常用属性包括 `numberOfTapsRequired`、`numberOfTouchesRequired`(若在环境中可用)。
|
|
19
|
-
-
|
|
19
|
+
- 结合 `UIGestureRecognizer` 的通用用法理解。
|
|
20
20
|
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: UITextInputMode
|
|
3
|
-
description:
|
|
3
|
+
description: 文本输入模式/上下文对象。仅在插件环境导出该类型时可用。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITextInputMode` 在系统 UIKit
|
|
6
|
+
`UITextInputMode` 在系统 UIKit 中用于描述当前键盘输入模式(例如输入法语言)。在插件环境它还暴露了一组与文本选择/标记相关的字段(会用于内部实现或统一接口映射)。
|
|
7
|
+
|
|
8
|
+
## 接口状态
|
|
9
|
+
|
|
10
|
+
`UITextInputMode`未注册到JSContext,无法进行直接调用、判断类型等操作、类似`Mb`开头的几个类。
|
|
7
11
|
|
|
8
12
|
## 实例成员 (Instance members)
|
|
9
13
|
|
|
@@ -19,7 +23,7 @@ description: 文本输入模式/上下文对象(运行时暴露)。可查询
|
|
|
19
23
|
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
20
24
|
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
21
25
|
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
22
|
-
| `text` | string \| null |
|
|
26
|
+
| `text` | string \| null | 只读。文本内容(环境提供)。 |
|
|
23
27
|
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
24
28
|
| `tokenizer` | id | 只读。分词器对象。 |
|
|
25
29
|
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: UITextPosition
|
|
3
|
-
description:
|
|
3
|
+
description: 文本位置对象(插件环境暴露)。常作为 UITextRange 的端点,并附带若干文本上下文字段。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITextPosition`
|
|
6
|
+
`UITextPosition` 表示文本中的一个位置点。插件环境中它与 `UITextRange`、`UITextInputMode` 一起出现,用于描述选区、标记文本等概念。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
插件环境为 `UITextPosition` 暴露了一组与“文本范围/输入上下文”相关的字段(语义与用途高度依赖具体实现)。常见用法是把它作为只读数据从插件环境取回并传递给其他 API。
|
|
11
11
|
|
|
12
12
|
### 属性
|
|
13
13
|
|
|
@@ -21,7 +21,7 @@ description: 文本位置对象(运行时暴露)。常作为 UITextRange 的
|
|
|
21
21
|
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
22
22
|
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
23
23
|
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
24
|
-
| `text` | string \| null |
|
|
24
|
+
| `text` | string \| null | 只读。文本内容(环境提供)。 |
|
|
25
25
|
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
26
26
|
| `tokenizer` | id | 只读。分词器对象。 |
|
|
27
27
|
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
@@ -34,7 +34,7 @@ description: 文本位置对象(运行时暴露)。常作为 UITextRange 的
|
|
|
34
34
|
|
|
35
35
|
## 类成员 (Class members)
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
当前接口未额外暴露 `UITextPosition` 的类成员。
|
|
38
38
|
|
|
39
39
|
## 相关
|
|
40
40
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: UITextRange
|
|
3
|
-
description:
|
|
3
|
+
description: 文本范围对象(插件环境暴露)。常用于描述选区/标记范围,并附带若干输入上下文字段。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITextRange`
|
|
6
|
+
`UITextRange` 表示一段文本范围。插件环境中它默认作为 `UITextInputMode`/`UITextPosition` 暴露字段的类型出现,用于描述选区或标记文本范围。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -19,7 +19,7 @@ description: 文本范围对象(运行时暴露)。常用于描述选区/标
|
|
|
19
19
|
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
20
20
|
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
21
21
|
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
22
|
-
| `text` | string \| null |
|
|
22
|
+
| `text` | string \| null | 只读。文本内容(环境提供)。 |
|
|
23
23
|
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
24
24
|
| `tokenizer` | id | 只读。分词器对象。 |
|
|
25
25
|
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
@@ -32,7 +32,7 @@ description: 文本范围对象(运行时暴露)。常用于描述选区/标
|
|
|
32
32
|
|
|
33
33
|
## 类成员 (Class members)
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
当前接口未额外暴露 `UITextRange` 的类成员。
|
|
36
36
|
|
|
37
37
|
## 相关
|
|
38
38
|
|
|
@@ -3,7 +3,7 @@ title: UITextView
|
|
|
3
3
|
description: 多行文本视图。支持 text/attributedText、typingAttributes、selectedRange 与滚动到范围可见。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITextView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/)
|
|
6
|
+
`UITextView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/),用于展示与编辑多行文本。插件环境暴露了常用的文本属性与少量方法。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -36,7 +36,7 @@ description: 多行文本视图。支持 text/attributedText、typingAttributes
|
|
|
36
36
|
|
|
37
37
|
## 类成员 (Class members)
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
当前接口未额外暴露 `UITextView` 的类成员。
|
|
40
40
|
|
|
41
41
|
## 相关
|
|
42
42
|
|
|
@@ -7,13 +7,13 @@ description: 单行文本输入框。
|
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### 属性
|
|
11
11
|
|
|
12
12
|
| 属性 | 类型 | 说明 |
|
|
13
13
|
|------|------|------|
|
|
14
14
|
| `text` | string | 当前文本。 |
|
|
15
15
|
| `placeholder` | string | 占位符。 |
|
|
16
|
-
| `frame` | CGRect | 位置与大小。 |
|
|
16
|
+
| `frame` | [CGRect](/reference/value-sturct/#cgrect) | 位置与大小。 |
|
|
17
17
|
| `borderStyle` | number | 边框样式(如 2)。 |
|
|
18
18
|
| `delegate` | id | 委托,可实现 textFieldShouldReturn 等。 |
|
|
19
19
|
|
|
@@ -25,7 +25,7 @@ description: 单行文本输入框。
|
|
|
25
25
|
|
|
26
26
|
## 类成员 (Class members)
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
当前接口未额外暴露 `UITextField` 的类成员。
|
|
29
29
|
|
|
30
30
|
## 相关
|
|
31
31
|
|
|
@@ -3,9 +3,9 @@ title: UITouch
|
|
|
3
3
|
description: 触摸对象。可查询 phase/timestamp/tapCount 与 view/window,并获取当前/上一位置。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UITouch`
|
|
6
|
+
`UITouch` 表示一次触摸点。插件环境暴露了 UIKit 常用字段与位置查询方法。
|
|
7
7
|
|
|
8
|
-
>
|
|
8
|
+
> 注意:插件环境还在此对象上暴露了一组 SpriteKit(`SKNode`)相关字段与方法(例如 `position`、`xScale` 等)。这默认是桥接层的复用/混入结果,**并不意味着每个 touch 都可以当作 SpriteKit 节点使用**。实际使用中把它当作触摸对象,仅使用与触摸相关的成员。
|
|
9
9
|
|
|
10
10
|
## 实例成员 (Instance members)
|
|
11
11
|
|
|
@@ -29,7 +29,7 @@ description: 触摸对象。可查询 phase/timestamp/tapCount 与 view/window
|
|
|
29
29
|
|
|
30
30
|
## 类成员 (Class members)
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
当前接口未额外暴露 `UITouch` 的类成员。
|
|
33
33
|
|
|
34
34
|
## 相关
|
|
35
35
|
|
|
@@ -7,7 +7,7 @@ description: 视图控制器基类,管理 view 与生命周期。
|
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### 属性
|
|
11
11
|
|
|
12
12
|
| 属性 | 类型 | 说明 |
|
|
13
13
|
|------|------|------|
|
|
@@ -28,7 +28,7 @@ description: 视图控制器基类,管理 view 与生命周期。
|
|
|
28
28
|
|
|
29
29
|
## 类成员 (Class members)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
当前接口未额外暴露 `UIViewController` 的类成员。
|
|
32
32
|
|
|
33
33
|
## 相关
|
|
34
34
|
|
|
@@ -7,12 +7,12 @@ description: 所有 UI 控件的基类,管理 frame、子视图与图层。
|
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
10
|
-
###
|
|
10
|
+
### 属性
|
|
11
11
|
|
|
12
12
|
| 属性 | 类型 | 说明 |
|
|
13
13
|
|------|------|------|
|
|
14
|
-
| `frame` | CGRect | 位置与大小。 |
|
|
15
|
-
| `bounds` | CGRect | 内部坐标系。 |
|
|
14
|
+
| `frame` | [CGRect](/reference/value-sturct/#cgrect) | 位置与大小。 |
|
|
15
|
+
| `bounds` | [CGRect](/reference/value-sturct/#cgrect) | 内部坐标系。 |
|
|
16
16
|
| `backgroundColor` | UIColor | 背景色。 |
|
|
17
17
|
| `hidden` | boolean | 是否隐藏。 |
|
|
18
18
|
| `layer` | CALayer | 图层,可设置 cornerRadius、borderWidth、borderColor 等。 |
|
|
@@ -23,7 +23,7 @@ description: 所有 UI 控件的基类,管理 frame、子视图与图层。
|
|
|
23
23
|
| `alpha` | number | 透明度。 |
|
|
24
24
|
| `autoresizingMask` | number | 自动调整掩码(如 1<<0 右边缘)。 |
|
|
25
25
|
|
|
26
|
-
###
|
|
26
|
+
### 方法
|
|
27
27
|
|
|
28
28
|
| 方法 | 说明 |
|
|
29
29
|
|------|------|
|
|
@@ -38,7 +38,7 @@ description: 所有 UI 控件的基类,管理 frame、子视图与图层。
|
|
|
38
38
|
|
|
39
39
|
## 类成员 (Class members)
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
当前接口未额外暴露 `UIView` 的类成员。
|
|
42
42
|
|
|
43
43
|
## 相关
|
|
44
44
|
|
|
@@ -11,10 +11,10 @@ UIWebView 用于在插件中嵌入网页或本地 HTML 页面,继承自 [UIVie
|
|
|
11
11
|
|
|
12
12
|
| 属性 | 类型 | 说明 |
|
|
13
13
|
| :--- | :--- | :--- |
|
|
14
|
-
| `delegate` | `id` | 实现 UIWebViewDelegate
|
|
14
|
+
| `delegate` | `id` | 实现 UIWebViewDelegate 的对象,为承载 WebView 的 ViewController(self)。 |
|
|
15
15
|
| `scrollView` | `UIScrollView` | 只读,内嵌滚动视图。 |
|
|
16
16
|
| `request` | `NSURLRequest` | 只读,当前请求。 |
|
|
17
|
-
| `loading` | `boolean` |
|
|
17
|
+
| `loading` | `boolean` | 只读,是否正在加载。 |
|
|
18
18
|
| `canGoBack` | `boolean` | 只读,是否可后退。 |
|
|
19
19
|
| `canGoForward` | `boolean` | 只读,是否可前进。 |
|
|
20
20
|
| `scalesPageToFit` | `boolean` | 是否按比例缩放以适应视图。 |
|
|
@@ -52,7 +52,7 @@ loadHTMLStringBaseURL(string: string, baseURL: NSURL | null): void
|
|
|
52
52
|
| `string` | `string` | HTML 内容字符串。 |
|
|
53
53
|
| `baseURL` | `NSURL \| null` | 基础 URL(用于解析相对路径)。 |
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
**说明:** 该方法名由参数标签拼接得到。
|
|
56
56
|
|
|
57
57
|
### `loadDataMIMETypeTextEncodingNameBaseURL`
|
|
58
58
|
|
|
@@ -84,7 +84,7 @@ loadFileURLAllowingReadAccessToURL(URL: NSURL, allowingReadAccessToURL: NSURL):
|
|
|
84
84
|
| Name | Type | Description |
|
|
85
85
|
| :--- | :--- | :--- |
|
|
86
86
|
| `URL` | `NSURL` | 文件 URL。 |
|
|
87
|
-
| `allowingReadAccessToURL` | `NSURL` |
|
|
87
|
+
| `allowingReadAccessToURL` | `NSURL` | 允许读取的访问路径(默认也是文件 URL 或其父目录)。 |
|
|
88
88
|
|
|
89
89
|
### `reload`
|
|
90
90
|
|
|
@@ -221,7 +221,7 @@ webViewShouldStartLoadWithRequestNavigationType(webView: UIWebView, request: NSU
|
|
|
221
221
|
|
|
222
222
|
## 类成员 (Class members)
|
|
223
223
|
|
|
224
|
-
|
|
224
|
+
当前接口未额外暴露 `UIWebView` 的类成员。
|
|
225
225
|
|
|
226
226
|
## 相关
|
|
227
227
|
|
|
@@ -3,7 +3,7 @@ title: UIWindow
|
|
|
3
3
|
description: 顶层窗口。支持设置 rootViewController、windowLevel(部分平台也支持 screen),并提供坐标系转换与事件分发。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`UIWindow` 继承自 [UIView](/reference/uikit/uiview/)
|
|
6
|
+
`UIWindow` 继承自 [UIView](/reference/uikit/uiview/),表示一个顶层窗口。插件环境里你会经常把它作为 `self.window` 或 controller 相关 API 的参数传递。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -37,7 +37,7 @@ description: 顶层窗口。支持设置 rootViewController、windowLevel(部
|
|
|
37
37
|
|
|
38
38
|
## 类成员 (Class members)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
当前接口未额外暴露 `UIWindow` 的类成员。
|
|
41
41
|
|
|
42
42
|
## 相关
|
|
43
43
|
|
|
@@ -3,7 +3,7 @@ title: SQLiteStatement
|
|
|
3
3
|
description: SQLite 语句对象(JSBSQLiteStatement),用于缓存/复用预编译语句。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
`SQLiteStatement` 表示一个 SQLite
|
|
6
|
+
`SQLiteStatement` 表示一个 SQLite 语句对象,默认由 SQLite 库内部管理与缓存。
|
|
7
7
|
|
|
8
8
|
## 实例成员 (Instance members)
|
|
9
9
|
|
|
@@ -41,4 +41,4 @@ reset(): void
|
|
|
41
41
|
|
|
42
42
|
## 类成员 (Class members)
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
当前接口未额外暴露 `SQLiteStatement` 的类成员。
|
|
@@ -2,27 +2,26 @@
|
|
|
2
2
|
title: ZipArchive
|
|
3
3
|
description: 压缩与解压 ZIP 文件(JSBSSZipArchive)。
|
|
4
4
|
---
|
|
5
|
-
|
|
6
|
-
协议名为 JSBSSZipArchive,用于 ZIP 的创建与解压。
|
|
5
|
+
用于 ZIP 的创建与解压。
|
|
7
6
|
|
|
8
7
|
## 类成员 (Class members)
|
|
9
8
|
|
|
10
|
-
| 方法
|
|
11
|
-
|
|
12
|
-
| `unzipFileAtPathToDestination(path, destination)`
|
|
9
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
10
|
+
| ----------------------------------------------------------------------------------------- | ------------------------------------------------------- | ------- | ---------------------- |
|
|
11
|
+
| `unzipFileAtPathToDestination(path, destination)` | path, destination: string | boolean | 解压到目录。 |
|
|
13
12
|
| `unzipFileAtPathToDestinationOverwritePassword(path, destination, overwrite, password)` | path, destination, overwrite: boolean, password: string | boolean | 解压并可覆盖、带密码。 |
|
|
14
|
-
| `createZipFileAtPathWithFilesAtPaths(path, filenames)`
|
|
15
|
-
| `createZipFileAtPathWithContentsOfDirectory(path, directoryPath)`
|
|
13
|
+
| `createZipFileAtPathWithFilesAtPaths(path, filenames)` | path: string, filenames: NSArray | boolean | 将多个文件打包为 ZIP。 |
|
|
14
|
+
| `createZipFileAtPathWithContentsOfDirectory(path, directoryPath)` | path, directoryPath: string | boolean | 将目录打包为 ZIP。 |
|
|
16
15
|
|
|
17
16
|
## 实例成员 (Instance members)
|
|
18
17
|
|
|
19
|
-
| 方法
|
|
20
|
-
|
|
21
|
-
| `initWithPath(path)`
|
|
22
|
-
| `open()`
|
|
23
|
-
| `writeFile(path)`
|
|
24
|
-
| `writeDataFilename(data, filename)` | 写入 NSData 并指定文件名。
|
|
25
|
-
| `close()`
|
|
18
|
+
| 方法 | 说明 |
|
|
19
|
+
| ------------------------------------- | ---------------------------- |
|
|
20
|
+
| `initWithPath(path)` | 创建实例,path 为 ZIP 路径。 |
|
|
21
|
+
| `open()` | 打开准备写入。 |
|
|
22
|
+
| `writeFile(path)` | 写入文件。 |
|
|
23
|
+
| `writeDataFilename(data, filename)` | 写入 NSData 并指定文件名。 |
|
|
24
|
+
| `close()` | 关闭。 |
|
|
26
25
|
|
|
27
26
|
## 相关
|
|
28
27
|
|