mn-docs-mcp 0.1.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/.env.example +4 -0
- package/.vscode/extensions.json +4 -0
- package/.vscode/launch.json +11 -0
- package/README.md +99 -0
- package/astro.config.mjs +126 -0
- package/package.json +30 -0
- package/pnpm-workspace.yaml +4 -0
- package/public/favicon.svg +1 -0
- package/scripts/mcp/build-index.mjs +9 -0
- package/scripts/mcp/cli.mjs +61 -0
- package/scripts/mcp/lib.mjs +303 -0
- package/scripts/mcp/server-http.mjs +74 -0
- package/scripts/mcp/server.mjs +91 -0
- package/src/assets/houston.webp +0 -0
- package/src/client/jsb-api-footer.ts +242 -0
- package/src/components/Footer.astro +57 -0
- package/src/components/Search.astro +330 -0
- package/src/content/docs/guides/contributing.md +82 -0
- package/src/content/docs/guides/cookbook/addon-settings.md +53 -0
- package/src/content/docs/guides/cookbook/append-selection-as-comment.md +46 -0
- package/src/content/docs/guides/cookbook/batch-rename-notes.md +53 -0
- package/src/content/docs/guides/cookbook/embed-webview-panel.md +158 -0
- package/src/content/docs/guides/cookbook/export-notebook.md +48 -0
- package/src/content/docs/guides/cookbook/focus-note-in-mindmap.md +34 -0
- package/src/content/docs/guides/cookbook/network-api-call.md +135 -0
- package/src/content/docs/guides/cookbook/webview-bidirectional-js.md +112 -0
- package/src/content/docs/guides/getting-started.md +88 -0
- package/src/content/docs/guides/lifecycle-and-window.md +76 -0
- package/src/content/docs/guides/mindmap-and-selection.md +76 -0
- package/src/content/docs/guides/native-ui.md +136 -0
- package/src/content/docs/guides/network-requests.md +309 -0
- package/src/content/docs/guides/notes-and-database.md +99 -0
- package/src/content/docs/guides/shortcut-keys.md +105 -0
- package/src/content/docs/guides/storage-and-files.md +91 -0
- package/src/content/docs/guides/toolbar-and-commands.md +64 -0
- package/src/content/docs/index.mdx +44 -0
- package/src/content/docs/reference/black-box.md +19 -0
- package/src/content/docs/reference/foundation/ns-array.md +699 -0
- package/src/content/docs/reference/foundation/ns-attributed-string.md +379 -0
- package/src/content/docs/reference/foundation/ns-character-set.md +436 -0
- package/src/content/docs/reference/foundation/ns-counted-set.md +78 -0
- package/src/content/docs/reference/foundation/ns-data.md +183 -0
- package/src/content/docs/reference/foundation/ns-date-components.md +24 -0
- package/src/content/docs/reference/foundation/ns-date-formatter.md +70 -0
- package/src/content/docs/reference/foundation/ns-date.md +236 -0
- package/src/content/docs/reference/foundation/ns-decimal-number.md +437 -0
- package/src/content/docs/reference/foundation/ns-dictionary.md +376 -0
- package/src/content/docs/reference/foundation/ns-enumerator.md +36 -0
- package/src/content/docs/reference/foundation/ns-error.md +75 -0
- package/src/content/docs/reference/foundation/ns-file-handle.md +445 -0
- package/src/content/docs/reference/foundation/ns-file-manager.md +275 -0
- package/src/content/docs/reference/foundation/ns-formatter.md +131 -0
- package/src/content/docs/reference/foundation/ns-hash-table.md +304 -0
- package/src/content/docs/reference/foundation/ns-http-url-response.md +73 -0
- package/src/content/docs/reference/foundation/ns-index-path.md +185 -0
- package/src/content/docs/reference/foundation/ns-index-set.md +527 -0
- package/src/content/docs/reference/foundation/ns-json-serialization.md +24 -0
- package/src/content/docs/reference/foundation/ns-keyed-archiver.md +364 -0
- package/src/content/docs/reference/foundation/ns-keyed-unarchiver.md +324 -0
- package/src/content/docs/reference/foundation/ns-locale.md +82 -0
- package/src/content/docs/reference/foundation/ns-map-table.md +216 -0
- package/src/content/docs/reference/foundation/ns-mutable-array.md +452 -0
- package/src/content/docs/reference/foundation/ns-mutable-attributed-string.md +336 -0
- package/src/content/docs/reference/foundation/ns-mutable-character-set.md +132 -0
- package/src/content/docs/reference/foundation/ns-mutable-data.md +206 -0
- package/src/content/docs/reference/foundation/ns-mutable-dictionary.md +176 -0
- package/src/content/docs/reference/foundation/ns-mutable-index-set.md +155 -0
- package/src/content/docs/reference/foundation/ns-mutable-ordered-set.md +465 -0
- package/src/content/docs/reference/foundation/ns-mutable-set.md +189 -0
- package/src/content/docs/reference/foundation/ns-mutable-string.md +190 -0
- package/src/content/docs/reference/foundation/ns-mutable-url-request.md +26 -0
- package/src/content/docs/reference/foundation/ns-notification-center.md +30 -0
- package/src/content/docs/reference/foundation/ns-notification.md +73 -0
- package/src/content/docs/reference/foundation/ns-null.md +24 -0
- package/src/content/docs/reference/foundation/ns-number-formatter.md +147 -0
- package/src/content/docs/reference/foundation/ns-number.md +393 -0
- package/src/content/docs/reference/foundation/ns-operation-queue.md +227 -0
- package/src/content/docs/reference/foundation/ns-operation.md +248 -0
- package/src/content/docs/reference/foundation/ns-ordered-set.md +706 -0
- package/src/content/docs/reference/foundation/ns-pointer-array.md +192 -0
- package/src/content/docs/reference/foundation/ns-predicate.md +199 -0
- package/src/content/docs/reference/foundation/ns-proxy.md +178 -0
- package/src/content/docs/reference/foundation/ns-scanner.md +448 -0
- package/src/content/docs/reference/foundation/ns-set.md +586 -0
- package/src/content/docs/reference/foundation/ns-simple-c-string.md +20 -0
- package/src/content/docs/reference/foundation/ns-time-zone.md +86 -0
- package/src/content/docs/reference/foundation/ns-timer.md +24 -0
- package/src/content/docs/reference/foundation/ns-url-components.md +80 -0
- package/src/content/docs/reference/foundation/ns-url-connection.md +169 -0
- package/src/content/docs/reference/foundation/ns-url-request.md +224 -0
- package/src/content/docs/reference/foundation/ns-url-response.md +97 -0
- package/src/content/docs/reference/foundation/ns-url.md +31 -0
- package/src/content/docs/reference/foundation/ns-user-defaults.md +302 -0
- package/src/content/docs/reference/foundation/ns-uuid.md +52 -0
- package/src/content/docs/reference/foundation/ns-value.md +194 -0
- package/src/content/docs/reference/global/application.md +301 -0
- package/src/content/docs/reference/global/builtin-commands.md +294 -0
- package/src/content/docs/reference/global/database.md +395 -0
- package/src/content/docs/reference/global/global-variables.md +32 -0
- package/src/content/docs/reference/global/jsb.md +89 -0
- package/src/content/docs/reference/global/note.md +64 -0
- package/src/content/docs/reference/global/popup-menu-item.md +18 -0
- package/src/content/docs/reference/global/popup-menu.md +38 -0
- package/src/content/docs/reference/global/search-manager.md +51 -0
- package/src/content/docs/reference/global/self.md +28 -0
- package/src/content/docs/reference/js-runtime.md +28 -0
- package/src/content/docs/reference/marginnote/document-controller.md +45 -0
- package/src/content/docs/reference/marginnote/jsextension.md +119 -0
- package/src/content/docs/reference/marginnote/mb-book-note.md +192 -0
- package/src/content/docs/reference/marginnote/mb-book.md +35 -0
- package/src/content/docs/reference/marginnote/mb-model-tool.md +66 -0
- package/src/content/docs/reference/marginnote/mb-topic.md +36 -0
- package/src/content/docs/reference/marginnote/mindmap-node.md +27 -0
- package/src/content/docs/reference/marginnote/mindmap-view.md +24 -0
- package/src/content/docs/reference/marginnote/note-comment.md +29 -0
- package/src/content/docs/reference/marginnote/notebook-controller.md +36 -0
- package/src/content/docs/reference/marginnote/outline-view.md +23 -0
- package/src/content/docs/reference/marginnote/reader-controller.md +26 -0
- package/src/content/docs/reference/marginnote/study-controller.md +100 -0
- package/src/content/docs/reference/quartzcore/caanimation-group.md +44 -0
- package/src/content/docs/reference/quartzcore/caanimation.md +23 -0
- package/src/content/docs/reference/quartzcore/cabasic-animation.md +19 -0
- package/src/content/docs/reference/quartzcore/cagradient-layer.md +27 -0
- package/src/content/docs/reference/quartzcore/cakeyframe-animation.md +19 -0
- package/src/content/docs/reference/quartzcore/calayer.md +135 -0
- package/src/content/docs/reference/quartzcore/camedia-timing-function.md +25 -0
- package/src/content/docs/reference/quartzcore/caproperty-animation.md +46 -0
- package/src/content/docs/reference/quartzcore/careplicator-layer.md +27 -0
- package/src/content/docs/reference/quartzcore/cascroll-layer.md +21 -0
- package/src/content/docs/reference/quartzcore/cashape-layer.md +34 -0
- package/src/content/docs/reference/quartzcore/catext-layer.md +28 -0
- package/src/content/docs/reference/quartzcore/catiled-layer.md +26 -0
- package/src/content/docs/reference/quartzcore/catransaction.md +46 -0
- package/src/content/docs/reference/quartzcore/catransform-layer.md +18 -0
- package/src/content/docs/reference/quartzcore/catransition.md +44 -0
- package/src/content/docs/reference/quartzcore/cavalue-function.md +22 -0
- package/src/content/docs/reference/uikit/ns-mutable-paragraph-style.md +20 -0
- package/src/content/docs/reference/uikit/ns-paragraph-style.md +20 -0
- package/src/content/docs/reference/uikit/ns-text-storage.md +20 -0
- package/src/content/docs/reference/uikit/uiactivity-indicator-view.md +20 -0
- package/src/content/docs/reference/uikit/uialertview.md +25 -0
- package/src/content/docs/reference/uikit/uiapplication.md +128 -0
- package/src/content/docs/reference/uikit/uibar-button-item.md +20 -0
- package/src/content/docs/reference/uikit/uibar-item.md +20 -0
- package/src/content/docs/reference/uikit/uibezier-path.md +143 -0
- package/src/content/docs/reference/uikit/uibutton.md +27 -0
- package/src/content/docs/reference/uikit/uicollection-view-cell.md +24 -0
- package/src/content/docs/reference/uikit/uicollection-view-controller.md +32 -0
- package/src/content/docs/reference/uikit/uicollection-view-layout-attributes.md +43 -0
- package/src/content/docs/reference/uikit/uicollection-view-layout.md +60 -0
- package/src/content/docs/reference/uikit/uicollection-view.md +83 -0
- package/src/content/docs/reference/uikit/uicolor.md +23 -0
- package/src/content/docs/reference/uikit/uicontrol.md +20 -0
- package/src/content/docs/reference/uikit/uidate-picker.md +37 -0
- package/src/content/docs/reference/uikit/uidevice.md +83 -0
- package/src/content/docs/reference/uikit/uievent.md +36 -0
- package/src/content/docs/reference/uikit/uifont.md +39 -0
- package/src/content/docs/reference/uikit/uigesture-recognizer.md +152 -0
- package/src/content/docs/reference/uikit/uiimage-picker-controller.md +41 -0
- package/src/content/docs/reference/uikit/uiimage-view.md +38 -0
- package/src/content/docs/reference/uikit/uiimage.md +58 -0
- package/src/content/docs/reference/uikit/uikey-command.md +31 -0
- package/src/content/docs/reference/uikit/uilabel.md +27 -0
- package/src/content/docs/reference/uikit/uilocal-notification.md +28 -0
- package/src/content/docs/reference/uikit/uilong-press-gesture-recognizer.md +25 -0
- package/src/content/docs/reference/uikit/uinavigation-bar.md +52 -0
- package/src/content/docs/reference/uikit/uinavigation-controller.md +46 -0
- package/src/content/docs/reference/uikit/uinavigation-item.md +42 -0
- package/src/content/docs/reference/uikit/uipage-control.md +35 -0
- package/src/content/docs/reference/uikit/uipage-view-controller.md +37 -0
- package/src/content/docs/reference/uikit/uipan-gesture-recognizer.md +32 -0
- package/src/content/docs/reference/uikit/uipasteboard.md +24 -0
- package/src/content/docs/reference/uikit/uipicker-view.md +37 -0
- package/src/content/docs/reference/uikit/uipinch-gesture-recognizer.md +23 -0
- package/src/content/docs/reference/uikit/uipopover-controller.md +39 -0
- package/src/content/docs/reference/uikit/uiresponder.md +20 -0
- package/src/content/docs/reference/uikit/uirotation-gesture-recognizer.md +23 -0
- package/src/content/docs/reference/uikit/uiscreen-mode.md +17 -0
- package/src/content/docs/reference/uikit/uiscreen.md +65 -0
- package/src/content/docs/reference/uikit/uiscrollview.md +134 -0
- package/src/content/docs/reference/uikit/uisearch-bar.md +58 -0
- package/src/content/docs/reference/uikit/uisegmented-control.md +64 -0
- package/src/content/docs/reference/uikit/uislider.md +50 -0
- package/src/content/docs/reference/uikit/uiswipe-gesture-recognizer.md +23 -0
- package/src/content/docs/reference/uikit/uiswitch.md +22 -0
- package/src/content/docs/reference/uikit/uitab-bar-controller.md +39 -0
- package/src/content/docs/reference/uikit/uitab-bar-item.md +34 -0
- package/src/content/docs/reference/uikit/uitab-bar.md +44 -0
- package/src/content/docs/reference/uikit/uitable-view-cell.md +57 -0
- package/src/content/docs/reference/uikit/uitable-view-controller.md +30 -0
- package/src/content/docs/reference/uikit/uitable-view.md +100 -0
- package/src/content/docs/reference/uikit/uitap-gesture-recognizer.md +20 -0
- package/src/content/docs/reference/uikit/uitext-input-mode.md +47 -0
- package/src/content/docs/reference/uikit/uitext-position.md +44 -0
- package/src/content/docs/reference/uikit/uitext-range.md +42 -0
- package/src/content/docs/reference/uikit/uitext-view.md +46 -0
- package/src/content/docs/reference/uikit/uitextfield.md +32 -0
- package/src/content/docs/reference/uikit/uitoolbar.md +35 -0
- package/src/content/docs/reference/uikit/uitouch.md +39 -0
- package/src/content/docs/reference/uikit/uiview-controller.md +36 -0
- package/src/content/docs/reference/uikit/uiview.md +47 -0
- package/src/content/docs/reference/uikit/uiwebview.md +229 -0
- package/src/content/docs/reference/uikit/uiwindow.md +47 -0
- package/src/content/docs/reference/utility/menu-controller.md +27 -0
- package/src/content/docs/reference/utility/speech-manager.md +118 -0
- package/src/content/docs/reference/utility/sqlite-database.md +201 -0
- package/src/content/docs/reference/utility/sqlite-result-set.md +266 -0
- package/src/content/docs/reference/utility/sqlite-statement.md +44 -0
- package/src/content/docs/reference/utility/undo-manager.md +89 -0
- package/src/content/docs/reference/utility/zip-archive.md +29 -0
- package/src/content.config.ts +7 -0
- package/src/definitions/Foundation/JSBFoundation.h +9 -0
- package/src/definitions/Foundation/JSBFoundation.m +530 -0
- package/src/definitions/Foundation/JSBNSArray.h +81 -0
- package/src/definitions/Foundation/JSBNSAssertionHandler.h +23 -0
- package/src/definitions/Foundation/JSBNSAttributedString.h +42 -0
- package/src/definitions/Foundation/JSBNSBlockOperation.h +20 -0
- package/src/definitions/Foundation/JSBNSBundle.h +80 -0
- package/src/definitions/Foundation/JSBNSByteCountFormatter.h +28 -0
- package/src/definitions/Foundation/JSBNSCache.h +31 -0
- package/src/definitions/Foundation/JSBNSCachedURLResponse.h +22 -0
- package/src/definitions/Foundation/JSBNSCalendar.h +88 -0
- package/src/definitions/Foundation/JSBNSCharacterSet.h +50 -0
- package/src/definitions/Foundation/JSBNSCoder.h +88 -0
- package/src/definitions/Foundation/JSBNSComparisonPredicate.h +27 -0
- package/src/definitions/Foundation/JSBNSCompoundPredicate.h +23 -0
- package/src/definitions/Foundation/JSBNSCondition.h +22 -0
- package/src/definitions/Foundation/JSBNSConditionLock.h +26 -0
- package/src/definitions/Foundation/JSBNSConstantString.h +18 -0
- package/src/definitions/Foundation/JSBNSCountedSet.h +21 -0
- package/src/definitions/Foundation/JSBNSData.h +44 -0
- package/src/definitions/Foundation/JSBNSDataDetector.h +20 -0
- package/src/definitions/Foundation/JSBNSDate.h +37 -0
- package/src/definitions/Foundation/JSBNSDateComponents.h +56 -0
- package/src/definitions/Foundation/JSBNSDateFormatter.h +91 -0
- package/src/definitions/Foundation/JSBNSDecimalNumber.h +47 -0
- package/src/definitions/Foundation/JSBNSDecimalNumberHandler.h +23 -0
- package/src/definitions/Foundation/JSBNSDictionary.h +79 -0
- package/src/definitions/Foundation/JSBNSDirectoryEnumerator.h +25 -0
- package/src/definitions/Foundation/JSBNSEnumerator.h +18 -0
- package/src/definitions/Foundation/JSBNSError.h +28 -0
- package/src/definitions/Foundation/JSBNSException.h +30 -0
- package/src/definitions/Foundation/JSBNSExpression.h +48 -0
- package/src/definitions/Foundation/JSBNSFileCoordinator.h +29 -0
- package/src/definitions/Foundation/JSBNSFileHandle.h +51 -0
- package/src/definitions/Foundation/JSBNSFileManager.h +82 -0
- package/src/definitions/Foundation/JSBNSFileSecurity.h +32 -0
- package/src/definitions/Foundation/JSBNSFileVersion.h +35 -0
- package/src/definitions/Foundation/JSBNSFileWrapper.h +41 -0
- package/src/definitions/Foundation/JSBNSFormatter.h +23 -0
- package/src/definitions/Foundation/JSBNSHTTPCookie.h +34 -0
- package/src/definitions/Foundation/JSBNSHTTPCookieStorage.h +26 -0
- package/src/definitions/Foundation/JSBNSHTTPURLResponse.h +21 -0
- package/src/definitions/Foundation/JSBNSHashTable.h +38 -0
- package/src/definitions/Foundation/JSBNSIndexPath.h +34 -0
- package/src/definitions/Foundation/JSBNSIndexSet.h +47 -0
- package/src/definitions/Foundation/JSBNSInputStream.h +28 -0
- package/src/definitions/Foundation/JSBNSInvocation.h +32 -0
- package/src/definitions/Foundation/JSBNSInvocationOperation.h +20 -0
- package/src/definitions/Foundation/JSBNSJSONSerialization.h +19 -0
- package/src/definitions/Foundation/JSBNSKeyedArchiver.h +40 -0
- package/src/definitions/Foundation/JSBNSKeyedUnarchiver.h +38 -0
- package/src/definitions/Foundation/JSBNSLinguisticTagger.h +31 -0
- package/src/definitions/Foundation/JSBNSLocale.h +39 -0
- package/src/definitions/Foundation/JSBNSLock.h +20 -0
- package/src/definitions/Foundation/JSBNSMachPort.h +26 -0
- package/src/definitions/Foundation/JSBNSMapTable.h +34 -0
- package/src/definitions/Foundation/JSBNSMessagePort.h +15 -0
- package/src/definitions/Foundation/JSBNSMetadataItem.h +22 -0
- package/src/definitions/Foundation/JSBNSMetadataQuery.h +53 -0
- package/src/definitions/Foundation/JSBNSMetadataQueryAttributeValueTuple.h +21 -0
- package/src/definitions/Foundation/JSBNSMetadataQueryResultGroup.h +24 -0
- package/src/definitions/Foundation/JSBNSMethodSignature.h +24 -0
- package/src/definitions/Foundation/JSBNSMutableArray.h +51 -0
- package/src/definitions/Foundation/JSBNSMutableAttributedString.h +39 -0
- package/src/definitions/Foundation/JSBNSMutableCharacterSet.h +26 -0
- package/src/definitions/Foundation/JSBNSMutableData.h +29 -0
- package/src/definitions/Foundation/JSBNSMutableDictionary.h +29 -0
- package/src/definitions/Foundation/JSBNSMutableIndexSet.h +25 -0
- package/src/definitions/Foundation/JSBNSMutableOrderedSet.h +50 -0
- package/src/definitions/Foundation/JSBNSMutableSet.h +28 -0
- package/src/definitions/Foundation/JSBNSMutableString.h +31 -0
- package/src/definitions/Foundation/JSBNSMutableURLRequest.h +38 -0
- package/src/definitions/Foundation/JSBNSNetService.h +43 -0
- package/src/definitions/Foundation/JSBNSNetServiceBrowser.h +33 -0
- package/src/definitions/Foundation/JSBNSNotification.h +23 -0
- package/src/definitions/Foundation/JSBNSNotificationCenter.h +27 -0
- package/src/definitions/Foundation/JSBNSNotificationQueue.h +22 -0
- package/src/definitions/Foundation/JSBNSNull.h +17 -0
- package/src/definitions/Foundation/JSBNSNumber.h +51 -0
- package/src/definitions/Foundation/JSBNSNumberFormatter.h +136 -0
- package/src/definitions/Foundation/JSBNSOperation.h +34 -0
- package/src/definitions/Foundation/JSBNSOperationQueue.h +32 -0
- package/src/definitions/Foundation/JSBNSOrderedSet.h +70 -0
- package/src/definitions/Foundation/JSBNSOrthography.h +27 -0
- package/src/definitions/Foundation/JSBNSOutputStream.h +33 -0
- package/src/definitions/Foundation/JSBNSPipe.h +26 -0
- package/src/definitions/Foundation/JSBNSPointerArray.h +33 -0
- package/src/definitions/Foundation/JSBNSPort.h +27 -0
- package/src/definitions/Foundation/JSBNSPredicate.h +31 -0
- package/src/definitions/Foundation/JSBNSProcessInfo.h +42 -0
- package/src/definitions/Foundation/JSBNSProgress.h +45 -0
- package/src/definitions/Foundation/JSBNSPropertyListSerialization.h +24 -0
- package/src/definitions/Foundation/JSBNSProxy.h +29 -0
- package/src/definitions/Foundation/JSBNSPurgeableData.h +16 -0
- package/src/definitions/Foundation/JSBNSRecursiveLock.h +20 -0
- package/src/definitions/Foundation/JSBNSRegularExpression.h +35 -0
- package/src/definitions/Foundation/JSBNSRunLoop.h +38 -0
- package/src/definitions/Foundation/JSBNSScanner.h +44 -0
- package/src/definitions/Foundation/JSBNSSet.h +52 -0
- package/src/definitions/Foundation/JSBNSSimpleCString.h +18 -0
- package/src/definitions/Foundation/JSBNSSortDescriptor.h +32 -0
- package/src/definitions/Foundation/JSBNSStream.h +26 -0
- package/src/definitions/Foundation/JSBNSString.h +178 -0
- package/src/definitions/Foundation/JSBNSTextCheckingResult.h +52 -0
- package/src/definitions/Foundation/JSBNSThread.h +46 -0
- package/src/definitions/Foundation/JSBNSTimeZone.h +46 -0
- package/src/definitions/Foundation/JSBNSTimer.h +29 -0
- package/src/definitions/Foundation/JSBNSURL.h +110 -0
- package/src/definitions/Foundation/JSBNSURLAuthenticationChallenge.h +24 -0
- package/src/definitions/Foundation/JSBNSURLCache.h +30 -0
- package/src/definitions/Foundation/JSBNSURLComponents.h +38 -0
- package/src/definitions/Foundation/JSBNSURLConnection.h +45 -0
- package/src/definitions/Foundation/JSBNSURLCredential.h +30 -0
- package/src/definitions/Foundation/JSBNSURLCredentialStorage.h +25 -0
- package/src/definitions/Foundation/JSBNSURLProtectionSpace.h +29 -0
- package/src/definitions/Foundation/JSBNSURLProtocol.h +32 -0
- package/src/definitions/Foundation/JSBNSURLRequest.h +40 -0
- package/src/definitions/Foundation/JSBNSURLResponse.h +22 -0
- package/src/definitions/Foundation/JSBNSURLSession.h +103 -0
- package/src/definitions/Foundation/JSBNSURLSessionConfiguration.h +58 -0
- package/src/definitions/Foundation/JSBNSURLSessionDataTask.h +18 -0
- package/src/definitions/Foundation/JSBNSURLSessionDownloadTask.h +20 -0
- package/src/definitions/Foundation/JSBNSURLSessionTask.h +58 -0
- package/src/definitions/Foundation/JSBNSURLSessionUploadTask.h +18 -0
- package/src/definitions/Foundation/JSBNSUUID.h +22 -0
- package/src/definitions/Foundation/JSBNSUbiquitousKeyValueStore.h +37 -0
- package/src/definitions/Foundation/JSBNSUndoManager.h +50 -0
- package/src/definitions/Foundation/JSBNSUserDefaults.h +52 -0
- package/src/definitions/Foundation/JSBNSValue.h +53 -0
- package/src/definitions/Foundation/JSBNSValueTransformer.h +24 -0
- package/src/definitions/Foundation/JSBNSXMLParser.h +34 -0
- package/src/definitions/JSBApplication.h +59 -0
- package/src/definitions/JSBDocumentController.h +32 -0
- package/src/definitions/JSBJSExtension.h +34 -0
- package/src/definitions/JSBMNFileSystem.h +50 -0
- package/src/definitions/JSBMNFileSystem.m +267 -0
- package/src/definitions/JSBMarginNote.h +9 -0
- package/src/definitions/JSBMarginNote.m +183 -0
- package/src/definitions/JSBMbBook.h +22 -0
- package/src/definitions/JSBMbBookNote.h +78 -0
- package/src/definitions/JSBMbModelTool.h +47 -0
- package/src/definitions/JSBMbTopic.h +28 -0
- package/src/definitions/JSBMenuController.h +21 -0
- package/src/definitions/JSBMindMapNode.h +20 -0
- package/src/definitions/JSBMindMapView.h +15 -0
- package/src/definitions/JSBNotebookController.h +22 -0
- package/src/definitions/JSBOutlineView.h +14 -0
- package/src/definitions/JSBPopupMenu.h +37 -0
- package/src/definitions/JSBPopupMenuItem.h +19 -0
- package/src/definitions/JSBReaderController.h +18 -0
- package/src/definitions/JSBSQLite.h +109 -0
- package/src/definitions/JSBSearchManager.h +55 -0
- package/src/definitions/JSBSearchManager.m +4 -0
- package/src/definitions/JSBSpeechManager.h +31 -0
- package/src/definitions/JSBStudyController.h +32 -0
- package/src/definitions/JSBUndoManager.h +23 -0
- package/src/definitions/JSBZipArchive.h +28 -0
- package/src/definitions/QuartzCore/JSBCAAnimation.h +21 -0
- package/src/definitions/QuartzCore/JSBCAAnimationGroup.h +37 -0
- package/src/definitions/QuartzCore/JSBCABasicAnimation.h +16 -0
- package/src/definitions/QuartzCore/JSBCADisplayLink.h +26 -0
- package/src/definitions/QuartzCore/JSBCAEAGLLayer.h +16 -0
- package/src/definitions/QuartzCore/JSBCAEmitterBehavior.h +24 -0
- package/src/definitions/QuartzCore/JSBCAEmitterCell.h +40 -0
- package/src/definitions/QuartzCore/JSBCAEmitterLayer.h +31 -0
- package/src/definitions/QuartzCore/JSBCAGradientLayer.h +20 -0
- package/src/definitions/QuartzCore/JSBCAKeyframeAnimation.h +16 -0
- package/src/definitions/QuartzCore/JSBCALayer.h +98 -0
- package/src/definitions/QuartzCore/JSBCAMediaTimingFunction.h +22 -0
- package/src/definitions/QuartzCore/JSBCAPropertyAnimation.h +39 -0
- package/src/definitions/QuartzCore/JSBCAReplicatorLayer.h +23 -0
- package/src/definitions/QuartzCore/JSBCAScrollLayer.h +18 -0
- package/src/definitions/QuartzCore/JSBCAShapeLayer.h +27 -0
- package/src/definitions/QuartzCore/JSBCATextLayer.h +23 -0
- package/src/definitions/QuartzCore/JSBCATiledLayer.h +21 -0
- package/src/definitions/QuartzCore/JSBCATransaction.h +32 -0
- package/src/definitions/QuartzCore/JSBCATransformLayer.h +15 -0
- package/src/definitions/QuartzCore/JSBCATransition.h +37 -0
- package/src/definitions/QuartzCore/JSBCAValueFunction.h +20 -0
- package/src/definitions/QuartzCore/JSBQuartzCore.h +9 -0
- package/src/definitions/QuartzCore/JSBQuartzCore.m +106 -0
- package/src/definitions/UIKit/JSBNSLayoutConstraint.h +30 -0
- package/src/definitions/UIKit/JSBNSLayoutManager.h +94 -0
- package/src/definitions/UIKit/JSBNSMutableParagraphStyle.h +16 -0
- package/src/definitions/UIKit/JSBNSParagraphStyle.h +37 -0
- package/src/definitions/UIKit/JSBNSShadow.h +20 -0
- package/src/definitions/UIKit/JSBNSStringDrawingContext.h +22 -0
- package/src/definitions/UIKit/JSBNSTextAttachment.h +24 -0
- package/src/definitions/UIKit/JSBNSTextContainer.h +27 -0
- package/src/definitions/UIKit/JSBNSTextStorage.h +31 -0
- package/src/definitions/UIKit/JSBNSTextTab.h +38 -0
- package/src/definitions/UIKit/JSBUIAcceleration.h +24 -0
- package/src/definitions/UIKit/JSBUIAccelerometer.h +28 -0
- package/src/definitions/UIKit/JSBUIAccessibilityElement.h +24 -0
- package/src/definitions/UIKit/JSBUIActionSheet.h +37 -0
- package/src/definitions/UIKit/JSBUIActivity.h +26 -0
- package/src/definitions/UIKit/JSBUIActivityIndicatorView.h +22 -0
- package/src/definitions/UIKit/JSBUIActivityItemProvider.h +22 -0
- package/src/definitions/UIKit/JSBUIActivityViewController.h +20 -0
- package/src/definitions/UIKit/JSBUIAlertView.h +39 -0
- package/src/definitions/UIKit/JSBUIApplication.h +37 -0
- package/src/definitions/UIKit/JSBUIAttachmentBehavior.h +26 -0
- package/src/definitions/UIKit/JSBUIBarButtonItem.h +48 -0
- package/src/definitions/UIKit/JSBUIBarItem.h +26 -0
- package/src/definitions/UIKit/JSBUIBezierPath.h +55 -0
- package/src/definitions/UIKit/JSBUIButton.h +51 -0
- package/src/definitions/UIKit/JSBUICollectionReusableView.h +26 -0
- package/src/definitions/UIKit/JSBUICollectionView.h +53 -0
- package/src/definitions/UIKit/JSBUICollectionViewCell.h +14 -0
- package/src/definitions/UIKit/JSBUICollectionViewController.h +21 -0
- package/src/definitions/UIKit/JSBUICollectionViewFlowLayout.h +29 -0
- package/src/definitions/UIKit/JSBUICollectionViewFlowLayoutInvalidationContext.h +25 -0
- package/src/definitions/UIKit/JSBUICollectionViewLayout.h +58 -0
- package/src/definitions/UIKit/JSBUICollectionViewLayoutAttributes.h +40 -0
- package/src/definitions/UIKit/JSBUICollectionViewLayoutInvalidationContext.h +36 -0
- package/src/definitions/UIKit/JSBUICollectionViewTransitionLayout.h +15 -0
- package/src/definitions/UIKit/JSBUICollectionViewUpdateItem.h +36 -0
- package/src/definitions/UIKit/JSBUICollisionBehavior.h +30 -0
- package/src/definitions/UIKit/JSBUIColor.h +67 -0
- package/src/definitions/UIKit/JSBUIControl.h +39 -0
- package/src/definitions/UIKit/JSBUIDatePicker.h +26 -0
- package/src/definitions/UIKit/JSBUIDevice.h +37 -0
- package/src/definitions/UIKit/JSBUIDictationPhrase.h +38 -0
- package/src/definitions/UIKit/JSBUIDocument.h +46 -0
- package/src/definitions/UIKit/JSBUIDocumentInteractionController.h +32 -0
- package/src/definitions/UIKit/JSBUIDynamicAnimator.h +27 -0
- package/src/definitions/UIKit/JSBUIDynamicBehavior.h +27 -0
- package/src/definitions/UIKit/JSBUIDynamicItemBehavior.h +30 -0
- package/src/definitions/UIKit/JSBUIEvent.h +24 -0
- package/src/definitions/UIKit/JSBUIFont.h +30 -0
- package/src/definitions/UIKit/JSBUIFontDescriptor.h +36 -0
- package/src/definitions/UIKit/JSBUIGestureRecognizer.h +44 -0
- package/src/definitions/UIKit/JSBUIGravityBehavior.h +24 -0
- package/src/definitions/UIKit/JSBUIImage.h +59 -0
- package/src/definitions/UIKit/JSBUIImagePickerController.h +30 -0
- package/src/definitions/UIKit/JSBUIImageView.h +28 -0
- package/src/definitions/UIKit/JSBUIInputView.h +15 -0
- package/src/definitions/UIKit/JSBUIInterpolatingMotionEffect.h +18 -0
- package/src/definitions/UIKit/JSBUIKeyCommand.h +25 -0
- package/src/definitions/UIKit/JSBUIKit.h +9 -0
- package/src/definitions/UIKit/JSBUIKit.m +614 -0
- package/src/definitions/UIKit/JSBUILabel.h +38 -0
- package/src/definitions/UIKit/JSBUILocalNotification.h +20 -0
- package/src/definitions/UIKit/JSBUILocalizedIndexedCollation.h +23 -0
- package/src/definitions/UIKit/JSBUILongPressGestureRecognizer.h +22 -0
- package/src/definitions/UIKit/JSBUIManagedDocument.h +26 -0
- package/src/definitions/UIKit/JSBUIMarkupTextPrintFormatter.h +17 -0
- package/src/definitions/UIKit/JSBUIMenuController.h +28 -0
- package/src/definitions/UIKit/JSBUIMenuItem.h +25 -0
- package/src/definitions/UIKit/JSBUIMotionEffect.h +24 -0
- package/src/definitions/UIKit/JSBUIMotionEffectGroup.h +16 -0
- package/src/definitions/UIKit/JSBUINavigationBar.h +47 -0
- package/src/definitions/UIKit/JSBUINavigationController.h +34 -0
- package/src/definitions/UIKit/JSBUINavigationItem.h +45 -0
- package/src/definitions/UIKit/JSBUINib.h +19 -0
- package/src/definitions/UIKit/JSBUIPageControl.h +24 -0
- package/src/definitions/UIKit/JSBUIPageViewController.h +27 -0
- package/src/definitions/UIKit/JSBUIPanGestureRecognizer.h +23 -0
- package/src/definitions/UIKit/JSBUIPasteboard.h +46 -0
- package/src/definitions/UIKit/JSBUIPercentDrivenInteractiveTransition.h +24 -0
- package/src/definitions/UIKit/JSBUIPickerView.h +28 -0
- package/src/definitions/UIKit/JSBUIPinchGestureRecognizer.h +19 -0
- package/src/definitions/UIKit/JSBUIPopoverBackgroundView.h +22 -0
- package/src/definitions/UIKit/JSBUIPopoverController.h +31 -0
- package/src/definitions/UIKit/JSBUIPrintFormatter.h +33 -0
- package/src/definitions/UIKit/JSBUIPrintInfo.h +26 -0
- package/src/definitions/UIKit/JSBUIPrintInteractionController.h +36 -0
- package/src/definitions/UIKit/JSBUIPrintPageRenderer.h +31 -0
- package/src/definitions/UIKit/JSBUIPrintPaper.h +22 -0
- package/src/definitions/UIKit/JSBUIProgressView.h +24 -0
- package/src/definitions/UIKit/JSBUIPushBehavior.h +28 -0
- package/src/definitions/UIKit/JSBUIReferenceLibraryViewController.h +19 -0
- package/src/definitions/UIKit/JSBUIRefreshControl.h +21 -0
- package/src/definitions/UIKit/JSBUIResponder.h +57 -0
- package/src/definitions/UIKit/JSBUIRotationGestureRecognizer.h +19 -0
- package/src/definitions/UIKit/JSBUIScreen.h +36 -0
- package/src/definitions/UIKit/JSBUIScreenEdgePanGestureRecognizer.h +18 -0
- package/src/definitions/UIKit/JSBUIScreenMode.h +19 -0
- package/src/definitions/UIKit/JSBUIScrollView.h +53 -0
- package/src/definitions/UIKit/JSBUISearchBar.h +55 -0
- package/src/definitions/UIKit/JSBUISearchDisplayController.h +28 -0
- package/src/definitions/UIKit/JSBUISegmentedControl.h +46 -0
- package/src/definitions/UIKit/JSBUISimpleTextPrintFormatter.h +18 -0
- package/src/definitions/UIKit/JSBUISlider.h +41 -0
- package/src/definitions/UIKit/JSBUISnapBehavior.h +18 -0
- package/src/definitions/UIKit/JSBUISplitViewController.h +26 -0
- package/src/definitions/UIKit/JSBUIStepper.h +31 -0
- package/src/definitions/UIKit/JSBUIStoryboard.h +19 -0
- package/src/definitions/UIKit/JSBUIStoryboardPopoverSegue.h +17 -0
- package/src/definitions/UIKit/JSBUIStoryboardSegue.h +23 -0
- package/src/definitions/UIKit/JSBUISwipeGestureRecognizer.h +19 -0
- package/src/definitions/UIKit/JSBUISwitch.h +20 -0
- package/src/definitions/UIKit/JSBUITabBar.h +33 -0
- package/src/definitions/UIKit/JSBUITabBarController.h +26 -0
- package/src/definitions/UIKit/JSBUITabBarItem.h +26 -0
- package/src/definitions/UIKit/JSBUITableView.h +70 -0
- package/src/definitions/UIKit/JSBUITableViewCell.h +48 -0
- package/src/definitions/UIKit/JSBUITableViewController.h +19 -0
- package/src/definitions/UIKit/JSBUITableViewHeaderFooterView.h +22 -0
- package/src/definitions/UIKit/JSBUITapGestureRecognizer.h +20 -0
- package/src/definitions/UIKit/JSBUITextChecker.h +27 -0
- package/src/definitions/UIKit/JSBUITextField.h +44 -0
- package/src/definitions/UIKit/JSBUITextInputMode.h +41 -0
- package/src/definitions/UIKit/JSBUITextInputStringTokenizer.h +40 -0
- package/src/definitions/UIKit/JSBUITextPosition.h +38 -0
- package/src/definitions/UIKit/JSBUITextRange.h +38 -0
- package/src/definitions/UIKit/JSBUITextSelectionRect.h +36 -0
- package/src/definitions/UIKit/JSBUITextView.h +34 -0
- package/src/definitions/UIKit/JSBUIToolbar.h +22 -0
- package/src/definitions/UIKit/JSBUITouch.h +49 -0
- package/src/definitions/UIKit/JSBUIVideoEditorController.h +19 -0
- package/src/definitions/UIKit/JSBUIView.h +140 -0
- package/src/definitions/UIKit/JSBUIViewController.h +127 -0
- package/src/definitions/UIKit/JSBUIViewPrintFormatter.h +15 -0
- package/src/definitions/UIKit/JSBUIWebView.h +38 -0
- package/src/definitions/UIKit/JSBUIWindow.h +32 -0
- package/src/styles/starlight-overrides.css +23 -0
- package/tsconfig.json +5 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITableView
|
|
3
|
+
description: 表格视图。支持数据刷新、查询可见项、滚动到行,以及 section/row 的批量增删改与复用注册。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITableView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/),用于展示分组或普通的列表。插件运行时通常通过 `dataSource`(以及运行时实现的 delegate)提供内容,并通过“注册 → 复用”机制创建 cell。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `style` | number | 只读。表格样式。 |
|
|
15
|
+
| `dataSource` | id | 数据源对象。 |
|
|
16
|
+
| `rowHeight` | number | 行高。 |
|
|
17
|
+
| `separatorStyle` | number | 分割线样式。 |
|
|
18
|
+
| `separatorColor` | UIColor \| null | 分割线颜色。 |
|
|
19
|
+
| `tableHeaderView` | UIView \| null | 表头视图。 |
|
|
20
|
+
| `tableFooterView` | UIView \| null | 表尾视图。 |
|
|
21
|
+
| `backgroundView` | UIView \| null | 背景视图。 |
|
|
22
|
+
| `allowsSelection` | boolean | 是否允许选择。 |
|
|
23
|
+
| `allowsMultipleSelectionDuringEditing` | boolean | 编辑状态下是否允许多选。 |
|
|
24
|
+
| `editing` | boolean | 是否编辑状态。 |
|
|
25
|
+
| `sectionHeaderHeight` | number | section 头部高度。 |
|
|
26
|
+
| `sectionFooterHeight` | number | section 底部高度。 |
|
|
27
|
+
|
|
28
|
+
### 刷新与查询
|
|
29
|
+
|
|
30
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
31
|
+
| --- | --- | --- | --- |
|
|
32
|
+
| `reloadData()` | — | void | 刷新全部数据。 |
|
|
33
|
+
| `reloadSectionIndexTitles()` | — | void | 刷新 section index 标题。 |
|
|
34
|
+
| `numberOfSections()` | — | number | section 数量。 |
|
|
35
|
+
| `numberOfRowsInSection(section)` | section: number | number | 指定 section 的行数。 |
|
|
36
|
+
| `rectForSection(section)` | section: number | { x: number, y: number, width: number, height: number } | section 区域。 |
|
|
37
|
+
| `rectForHeaderInSection(section)` | section: number | { x: number, y: number, width: number, height: number } | section header 区域。 |
|
|
38
|
+
| `rectForFooterInSection(section)` | section: number | { x: number, y: number, width: number, height: number } | section footer 区域。 |
|
|
39
|
+
| `rectForRowAtIndexPath(indexPath)` | indexPath: NSIndexPath | { x: number, y: number, width: number, height: number } | 行区域。 |
|
|
40
|
+
| `indexPathForRowAtPoint(point)` | point: { x: number, y: number } | NSIndexPath \| null | 根据点坐标反查行 indexPath。 |
|
|
41
|
+
| `indexPathForCell(cell)` | cell: UITableViewCell | NSIndexPath \| null | 根据 cell 反查 indexPath。 |
|
|
42
|
+
| `indexPathsForRowsInRect(rect)` | rect: { x: number, y: number, width: number, height: number } | NSArray | rect 内行的 indexPath 列表。 |
|
|
43
|
+
| `cellForRowAtIndexPath(indexPath)` | indexPath: NSIndexPath | UITableViewCell \| null | 返回已创建且可见的 cell(不可见则可能为 null)。 |
|
|
44
|
+
| `visibleCells()` | — | NSArray | 可见 cell 列表。 |
|
|
45
|
+
| `indexPathsForVisibleRows()` | — | NSArray | 可见行的 indexPath 列表。 |
|
|
46
|
+
| `headerViewForSection(section)` | section: number | UIView \| null | 返回 section header view(可见时)。 |
|
|
47
|
+
| `footerViewForSection(section)` | section: number | UIView \| null | 返回 section footer view(可见时)。 |
|
|
48
|
+
|
|
49
|
+
### 滚动
|
|
50
|
+
|
|
51
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| `scrollToRowAtIndexPathAtScrollPositionAnimated(indexPath, scrollPosition, animated)` | indexPath: NSIndexPath, scrollPosition: number, animated: boolean | void | 滚动到指定行。 |
|
|
54
|
+
| `scrollToNearestSelectedRowAtScrollPositionAnimated(scrollPosition, animated)` | scrollPosition: number, animated: boolean | void | 滚动到最近的选中行。 |
|
|
55
|
+
|
|
56
|
+
### 批量更新
|
|
57
|
+
|
|
58
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
59
|
+
| --- | --- | --- | --- |
|
|
60
|
+
| `beginUpdates()` | — | void | 开始一组批量更新。 |
|
|
61
|
+
| `endUpdates()` | — | void | 结束一组批量更新。 |
|
|
62
|
+
| `insertSectionsWithRowAnimation(sections, animation)` | sections: NSIndexSet, animation: number | void | 插入 section。 |
|
|
63
|
+
| `deleteSectionsWithRowAnimation(sections, animation)` | sections: NSIndexSet, animation: number | void | 删除 section。 |
|
|
64
|
+
| `reloadSectionsWithRowAnimation(sections, animation)` | sections: NSIndexSet, animation: number | void | 刷新 section。 |
|
|
65
|
+
| `moveSectionToSection(section, newSection)` | section: number, newSection: number | void | 移动 section。 |
|
|
66
|
+
| `insertRowsAtIndexPathsWithRowAnimation(indexPaths, animation)` | indexPaths: NSArray, animation: number | void | 插入行。 |
|
|
67
|
+
| `deleteRowsAtIndexPathsWithRowAnimation(indexPaths, animation)` | indexPaths: NSArray, animation: number | void | 删除行。 |
|
|
68
|
+
| `reloadRowsAtIndexPathsWithRowAnimation(indexPaths, animation)` | indexPaths: NSArray, animation: number | void | 刷新行。 |
|
|
69
|
+
| `moveRowAtIndexPathToIndexPath(indexPath, newIndexPath)` | indexPath: NSIndexPath, newIndexPath: NSIndexPath | void | 移动行。 |
|
|
70
|
+
|
|
71
|
+
### 选择与编辑
|
|
72
|
+
|
|
73
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
74
|
+
| --- | --- | --- | --- |
|
|
75
|
+
| `setEditingAnimated(editing, animated)` | editing: boolean, animated: boolean | void | 设置编辑状态(可动画)。 |
|
|
76
|
+
| `indexPathForSelectedRow()` | — | NSIndexPath \| null | 当前选中行(单选场景)。 |
|
|
77
|
+
| `indexPathsForSelectedRows()` | — | NSArray | 当前选中行列表(多选场景)。 |
|
|
78
|
+
| `selectRowAtIndexPathAnimatedScrollPosition(indexPath, animated, scrollPosition)` | indexPath: NSIndexPath, animated: boolean, scrollPosition: number | void | 选中行并可滚动到可见位置。 |
|
|
79
|
+
| `deselectRowAtIndexPathAnimated(indexPath, animated)` | indexPath: NSIndexPath, animated: boolean | void | 取消选中。 |
|
|
80
|
+
|
|
81
|
+
### 复用与注册
|
|
82
|
+
|
|
83
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
84
|
+
| --- | --- | --- | --- |
|
|
85
|
+
| `dequeueReusableCellWithIdentifier(identifier)` | identifier: string | id | 按 identifier 取出复用 cell。 |
|
|
86
|
+
| `dequeueReusableCellWithIdentifierForIndexPath(identifier, indexPath)` | identifier: string, indexPath: NSIndexPath | id | 按 identifier 与 indexPath 取出复用 cell。 |
|
|
87
|
+
| `dequeueReusableHeaderFooterViewWithIdentifier(identifier)` | identifier: string | id | 取出复用 header/footer view。 |
|
|
88
|
+
| `registerClassForCellReuseIdentifier(cellClass, identifier)` | cellClass: id, identifier: string | void | 注册 cell 类型。 |
|
|
89
|
+
| `registerClassForHeaderFooterViewReuseIdentifier(aClass, identifier)` | aClass: id, identifier: string | void | 注册 header/footer view 类型。 |
|
|
90
|
+
|
|
91
|
+
## 类成员 (Class members)
|
|
92
|
+
|
|
93
|
+
当前运行时未额外暴露 `UITableView` 的类成员。
|
|
94
|
+
|
|
95
|
+
## 相关
|
|
96
|
+
|
|
97
|
+
- [UIScrollView](/reference/uikit/uiscrollview/)
|
|
98
|
+
- [UITableViewCell](/reference/uikit/uitable-view-cell/)
|
|
99
|
+
- [UIView](/reference/uikit/uiview/)
|
|
100
|
+
- [NSIndexPath](/reference/foundation/ns-index-path/)、[NSIndexSet](/reference/foundation/ns-index-set/)、[NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITapGestureRecognizer
|
|
3
|
+
description: 点击手势识别器。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITapGestureRecognizer` 用于识别点击/多击与多指点击。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
可通过实例属性配置点击次数与触点数要求(如 `numberOfTapsRequired`、`numberOfTouchesRequired`),并用 `UIGestureRecognizer` 的通用方法绑定回调、查询位置等。
|
|
11
|
+
|
|
12
|
+
## 类成员 (Class members)
|
|
13
|
+
|
|
14
|
+
当前运行时未额外暴露 `UITapGestureRecognizer` 的类成员。
|
|
15
|
+
|
|
16
|
+
## 提示
|
|
17
|
+
|
|
18
|
+
- 常用属性包括 `numberOfTapsRequired`、`numberOfTouchesRequired`(若在环境中可用)。
|
|
19
|
+
- 建议结合 `UIGestureRecognizer` 的通用用法理解。
|
|
20
|
+
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITextInputMode
|
|
3
|
+
description: 文本输入模式/上下文对象(运行时暴露)。可查询 primaryLanguage,并枚举当前/活跃输入模式。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITextInputMode` 在系统 UIKit 中用于描述当前键盘输入模式(例如输入法语言)。在插件运行时它还暴露了一组与文本选择/标记相关的字段(可能用于内部实现或统一接口映射)。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `primaryLanguage` | string \| null | 只读。主要语言标识(例如 `"en-US"`)。 |
|
|
15
|
+
| `markedTextRange` | UITextRange \| null | 只读。标记文本范围。 |
|
|
16
|
+
| `selectedTextRange` | UITextRange \| null | 当前选中文本范围(可读写)。 |
|
|
17
|
+
| `markedTextStyle` | NSDictionary \| null | 标记文本样式。 |
|
|
18
|
+
| `beginningOfDocument` | UITextPosition \| null | 只读。文档起点。 |
|
|
19
|
+
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
20
|
+
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
21
|
+
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
22
|
+
| `text` | string \| null | 只读。文本内容(若运行时提供)。 |
|
|
23
|
+
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
24
|
+
| `tokenizer` | id | 只读。分词器对象。 |
|
|
25
|
+
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
26
|
+
| `writingDirection` | number | 只读。书写方向。 |
|
|
27
|
+
| `selectionAffinity` | number | 选择亲和方向。 |
|
|
28
|
+
| `empty` | boolean | 只读。是否为空。 |
|
|
29
|
+
| `isVertical` | boolean | 只读。是否垂直布局。 |
|
|
30
|
+
| `containsStart` | boolean | 只读。是否包含起点。 |
|
|
31
|
+
| `containsEnd` | boolean | 只读。是否包含终点。 |
|
|
32
|
+
| `alternativeInterpretations` | NSArray | 只读。备选解释列表。 |
|
|
33
|
+
| `inputDelegate` | id | 输入代理对象。 |
|
|
34
|
+
|
|
35
|
+
## 类成员 (Class members)
|
|
36
|
+
|
|
37
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
38
|
+
| --- | --- | --- | --- |
|
|
39
|
+
| `currentInputMode()` | — | UITextInputMode \| null | 返回当前输入模式。 |
|
|
40
|
+
| `activeInputModes()` | — | NSArray | 返回活跃输入模式列表。 |
|
|
41
|
+
|
|
42
|
+
## 相关
|
|
43
|
+
|
|
44
|
+
- [UITextPosition](/reference/uikit/uitext-position/)
|
|
45
|
+
- [UITextRange](/reference/uikit/uitext-range/)
|
|
46
|
+
- [UIView](/reference/uikit/uiview/)
|
|
47
|
+
- [NSArray](/reference/foundation/ns-array/)、[NSDictionary](/reference/foundation/ns-dictionary/)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITextPosition
|
|
3
|
+
description: 文本位置对象(运行时暴露)。常作为 UITextRange 的端点,并附带若干文本上下文字段。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITextPosition` 表示文本中的一个位置点。插件运行时中它与 `UITextRange`、`UITextInputMode` 一起出现,用于描述选区、标记文本等概念。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
当前运行时为 `UITextPosition` 暴露了一组与“文本范围/输入上下文”相关的字段(语义与用途高度依赖具体实现)。常见用法是把它作为只读数据从运行时取回并传递给其他 API。
|
|
11
|
+
|
|
12
|
+
### 属性
|
|
13
|
+
|
|
14
|
+
| 属性 | 类型 | 说明 |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `primaryLanguage` | string \| null | 只读。主要语言。 |
|
|
17
|
+
| `markedTextRange` | UITextRange \| null | 只读。标记文本范围。 |
|
|
18
|
+
| `selectedTextRange` | UITextRange \| null | 当前选区(可读写)。 |
|
|
19
|
+
| `markedTextStyle` | NSDictionary \| null | 标记文本样式。 |
|
|
20
|
+
| `beginningOfDocument` | UITextPosition \| null | 只读。文档起点。 |
|
|
21
|
+
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
22
|
+
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
23
|
+
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
24
|
+
| `text` | string \| null | 只读。文本内容(若运行时提供)。 |
|
|
25
|
+
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
26
|
+
| `tokenizer` | id | 只读。分词器对象。 |
|
|
27
|
+
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
28
|
+
| `empty` | boolean | 只读。是否为空。 |
|
|
29
|
+
| `isVertical` | boolean | 只读。是否垂直布局。 |
|
|
30
|
+
| `containsStart` | boolean | 只读。是否包含起点。 |
|
|
31
|
+
| `containsEnd` | boolean | 只读。是否包含终点。 |
|
|
32
|
+
| `alternativeInterpretations` | NSArray | 只读。备选解释列表。 |
|
|
33
|
+
| `inputDelegate` | id | 输入代理对象。 |
|
|
34
|
+
|
|
35
|
+
## 类成员 (Class members)
|
|
36
|
+
|
|
37
|
+
当前运行时未额外暴露 `UITextPosition` 的类成员。
|
|
38
|
+
|
|
39
|
+
## 相关
|
|
40
|
+
|
|
41
|
+
- [UITextRange](/reference/uikit/uitext-range/)
|
|
42
|
+
- [UITextInputMode](/reference/uikit/uitext-input-mode/)
|
|
43
|
+
- [UIView](/reference/uikit/uiview/)
|
|
44
|
+
- [NSArray](/reference/foundation/ns-array/)、[NSDictionary](/reference/foundation/ns-dictionary/)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITextRange
|
|
3
|
+
description: 文本范围对象(运行时暴露)。常用于描述选区/标记范围,并附带若干输入上下文字段。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITextRange` 表示一段文本范围。插件运行时中它通常作为 `UITextInputMode`/`UITextPosition` 暴露字段的类型出现,用于描述选区或标记文本范围。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `primaryLanguage` | string \| null | 只读。主要语言。 |
|
|
15
|
+
| `markedTextRange` | UITextRange \| null | 只读。标记文本范围。 |
|
|
16
|
+
| `selectedTextRange` | UITextRange \| null | 当前选区(可读写)。 |
|
|
17
|
+
| `markedTextStyle` | NSDictionary \| null | 标记文本样式。 |
|
|
18
|
+
| `beginningOfDocument` | UITextPosition \| null | 只读。文档起点。 |
|
|
19
|
+
| `endOfDocument` | UITextPosition \| null | 只读。文档终点。 |
|
|
20
|
+
| `start` | UITextPosition \| null | 只读。范围起点。 |
|
|
21
|
+
| `end` | UITextPosition \| null | 只读。范围终点。 |
|
|
22
|
+
| `text` | string \| null | 只读。文本内容(若运行时提供)。 |
|
|
23
|
+
| `rect` | { x: number, y: number, width: number, height: number } | 只读。相关区域。 |
|
|
24
|
+
| `tokenizer` | id | 只读。分词器对象。 |
|
|
25
|
+
| `textInputView` | UIView \| null | 只读。输入视图。 |
|
|
26
|
+
| `empty` | boolean | 只读。是否为空。 |
|
|
27
|
+
| `isVertical` | boolean | 只读。是否垂直布局。 |
|
|
28
|
+
| `containsStart` | boolean | 只读。是否包含起点。 |
|
|
29
|
+
| `containsEnd` | boolean | 只读。是否包含终点。 |
|
|
30
|
+
| `alternativeInterpretations` | NSArray | 只读。备选解释列表。 |
|
|
31
|
+
| `inputDelegate` | id | 输入代理对象。 |
|
|
32
|
+
|
|
33
|
+
## 类成员 (Class members)
|
|
34
|
+
|
|
35
|
+
当前运行时未额外暴露 `UITextRange` 的类成员。
|
|
36
|
+
|
|
37
|
+
## 相关
|
|
38
|
+
|
|
39
|
+
- [UITextPosition](/reference/uikit/uitext-position/)
|
|
40
|
+
- [UITextInputMode](/reference/uikit/uitext-input-mode/)
|
|
41
|
+
- [UIView](/reference/uikit/uiview/)
|
|
42
|
+
- [NSArray](/reference/foundation/ns-array/)、[NSDictionary](/reference/foundation/ns-dictionary/)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITextView
|
|
3
|
+
description: 多行文本视图。支持 text/attributedText、typingAttributes、selectedRange 与滚动到范围可见。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITextView` 继承自 [UIScrollView](/reference/uikit/uiscrollview/),用于展示与编辑多行文本。插件运行时暴露了常用的文本属性与少量方法。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `text` | string | 文本内容。 |
|
|
15
|
+
| `attributedText` | NSAttributedString \| null | 富文本内容。 |
|
|
16
|
+
| `textColor` | UIColor \| null | 文本颜色。 |
|
|
17
|
+
| `font` | UIFont \| null | 字体。 |
|
|
18
|
+
| `textAlignment` | number | 对齐方式。 |
|
|
19
|
+
| `editable` | boolean | 是否可编辑。 |
|
|
20
|
+
| `selectable` | boolean | 是否可选中。 |
|
|
21
|
+
| `allowsEditingTextAttributes` | boolean | 是否允许编辑文字属性。 |
|
|
22
|
+
| `dataDetectorTypes` | number | 数据检测类型。 |
|
|
23
|
+
| `typingAttributes` | NSDictionary \| null | 输入时使用的属性。 |
|
|
24
|
+
| `selectedRange` | object | 当前选区范围。 |
|
|
25
|
+
| `textContainerInset` | object | 文本容器内边距。 |
|
|
26
|
+
| `layoutManager` | id | 只读。布局管理器。 |
|
|
27
|
+
| `textStorage` | NSTextStorage | 只读。文本存储。 |
|
|
28
|
+
| `textContainer` | id | 只读。文本容器。 |
|
|
29
|
+
|
|
30
|
+
### 方法
|
|
31
|
+
|
|
32
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `scrollRangeToVisible(range)` | range: object | void | 滚动使指定文本范围可见。 |
|
|
35
|
+
| `initWithFrameTextContainer(frame, textContainer)` | frame: { x: number, y: number, width: number, height: number }, textContainer: id \| null | UITextView | 以 frame 与 textContainer 初始化。 |
|
|
36
|
+
|
|
37
|
+
## 类成员 (Class members)
|
|
38
|
+
|
|
39
|
+
当前运行时未额外暴露 `UITextView` 的类成员。
|
|
40
|
+
|
|
41
|
+
## 相关
|
|
42
|
+
|
|
43
|
+
- [UIScrollView](/reference/uikit/uiscrollview/)
|
|
44
|
+
- [NSTextStorage](/reference/uikit/ns-text-storage/)
|
|
45
|
+
- [UIFont](/reference/uikit/uifont/)、[UIColor](/reference/uikit/uicolor/)
|
|
46
|
+
- [NSDictionary](/reference/foundation/ns-dictionary/)、[NSAttributedString](/reference/foundation/ns-attributed-string/)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITextField
|
|
3
|
+
description: 单行文本输入框。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
单行文本输入。通过 `new UITextField(frame)` 创建。可设置 `placeholder`、`text`、`delegate`(需实现如 textFieldShouldReturn)等。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性(常用)
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
|------|------|------|
|
|
14
|
+
| `text` | string | 当前文本。 |
|
|
15
|
+
| `placeholder` | string | 占位符。 |
|
|
16
|
+
| `frame` | CGRect | 位置与大小。 |
|
|
17
|
+
| `borderStyle` | number | 边框样式(如 2)。 |
|
|
18
|
+
| `delegate` | id | 委托,可实现 textFieldShouldReturn 等。 |
|
|
19
|
+
|
|
20
|
+
### 方法
|
|
21
|
+
|
|
22
|
+
| 方法 | 说明 |
|
|
23
|
+
|------|------|
|
|
24
|
+
| `resignFirstResponder()` | 收起键盘。 |
|
|
25
|
+
|
|
26
|
+
## 类成员 (Class members)
|
|
27
|
+
|
|
28
|
+
当前运行时未额外暴露 `UITextField` 的类成员。
|
|
29
|
+
|
|
30
|
+
## 相关
|
|
31
|
+
|
|
32
|
+
- [UIView](/reference/uikit/uiview/)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIToolbar
|
|
3
|
+
description: 工具栏视图。管理 items 与外观(barTintColor/barStyle/translucent),并支持动画设置 items。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIToolbar` 继承自 [UIView](/reference/uikit/uiview/),用于展示一排工具按钮(`UIBarButtonItem`)。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `items` | NSArray | 工具栏按钮项数组。 |
|
|
15
|
+
| `delegate` | id | 代理对象。 |
|
|
16
|
+
| `translucent` | boolean | 是否半透明。 |
|
|
17
|
+
| `barTintColor` | UIColor \| null | bar 背景色。 |
|
|
18
|
+
| `barStyle` | number | bar 样式。 |
|
|
19
|
+
|
|
20
|
+
### 方法
|
|
21
|
+
|
|
22
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
23
|
+
| --- | --- | --- | --- |
|
|
24
|
+
| `setItemsAnimated(items, animated)` | items: NSArray, animated: boolean | void | 设置 items(可动画)。 |
|
|
25
|
+
|
|
26
|
+
## 类成员 (Class members)
|
|
27
|
+
|
|
28
|
+
当前运行时未额外暴露 `UIToolbar` 的类成员。
|
|
29
|
+
|
|
30
|
+
## 相关
|
|
31
|
+
|
|
32
|
+
- [UIBarButtonItem](/reference/uikit/uibar-button-item/)
|
|
33
|
+
- [UIView](/reference/uikit/uiview/)
|
|
34
|
+
- [UIColor](/reference/uikit/uicolor/)
|
|
35
|
+
- [NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UITouch
|
|
3
|
+
description: 触摸对象。可查询 phase/timestamp/tapCount 与 view/window,并获取当前/上一位置。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UITouch` 表示一次触摸点。插件运行时暴露了 UIKit 常用字段与位置查询方法。
|
|
7
|
+
|
|
8
|
+
> 注意:运行时还在此对象上暴露了一组 SpriteKit(`SKNode`)相关字段与方法(例如 `position`、`xScale` 等)。这通常是桥接层的复用/混入结果,**并不意味着每个 touch 都可以当作 SpriteKit 节点使用**。实际使用中建议把它当作触摸对象,仅使用与触摸相关的成员。
|
|
9
|
+
|
|
10
|
+
## 实例成员 (Instance members)
|
|
11
|
+
|
|
12
|
+
### 属性(触摸相关)
|
|
13
|
+
|
|
14
|
+
| 属性 | 类型 | 说明 |
|
|
15
|
+
| --- | --- | --- |
|
|
16
|
+
| `phase` | number | 只读。触摸阶段。 |
|
|
17
|
+
| `timestamp` | number | 只读。时间戳。 |
|
|
18
|
+
| `tapCount` | number | 只读。点击次数。 |
|
|
19
|
+
| `view` | UIView \| null | 只读。触摸所在 view。 |
|
|
20
|
+
| `window` | UIWindow \| null | 只读。触摸所在 window。 |
|
|
21
|
+
| `gestureRecognizers` | NSArray | 只读。关联的手势识别器列表。 |
|
|
22
|
+
|
|
23
|
+
### 方法(触摸位置)
|
|
24
|
+
|
|
25
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `locationInView(view)` | view: UIView \| null | { x: number, y: number } | 返回在指定 view 坐标系下的位置。 |
|
|
28
|
+
| `previousLocationInView(view)` | view: UIView \| null | { x: number, y: number } | 返回上一时刻位置。 |
|
|
29
|
+
|
|
30
|
+
## 类成员 (Class members)
|
|
31
|
+
|
|
32
|
+
当前运行时未额外暴露 `UITouch` 的类成员。
|
|
33
|
+
|
|
34
|
+
## 相关
|
|
35
|
+
|
|
36
|
+
- [UIEvent](/reference/uikit/uievent/)
|
|
37
|
+
- [UIView](/reference/uikit/uiview/)
|
|
38
|
+
- [UIWindow](/reference/uikit/uiwindow/)
|
|
39
|
+
- [NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIViewController
|
|
3
|
+
description: 视图控制器基类,管理 view 与生命周期。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
视图控制器基类。可用 `JSB.defineClass('MyVC : UIViewController', { viewDidLoad: function() { ... } })` 定义子类。`view` 为其管理的根视图。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性(常用)
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
|------|------|------|
|
|
14
|
+
| `view` | UIView | 控制器管理的视图。 |
|
|
15
|
+
| `title` | string | 标题。 |
|
|
16
|
+
| `navigationItem` | UINavigationItem | 导航栏项。 |
|
|
17
|
+
| `navigationController` | UINavigationController | 所在导航控制器。 |
|
|
18
|
+
|
|
19
|
+
### 生命周期方法
|
|
20
|
+
|
|
21
|
+
| 方法 | 说明 |
|
|
22
|
+
|------|------|
|
|
23
|
+
| `viewDidLoad()` | 视图加载完成后调用,常在此做 UI 初始化。 |
|
|
24
|
+
| `viewWillAppear(animated)` | 视图即将显示。 |
|
|
25
|
+
| `viewDidAppear(animated)` | 视图已显示。 |
|
|
26
|
+
| `viewWillDisappear(animated)` | 视图即将消失。 |
|
|
27
|
+
| `viewDidDisappear(animated)` | 视图已消失。 |
|
|
28
|
+
|
|
29
|
+
## 类成员 (Class members)
|
|
30
|
+
|
|
31
|
+
当前运行时未额外暴露 `UIViewController` 的类成员。
|
|
32
|
+
|
|
33
|
+
## 相关
|
|
34
|
+
|
|
35
|
+
- [UIView](/reference/uikit/uiview/)
|
|
36
|
+
- [教程:原生 UI](/guides/native-ui/)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIView
|
|
3
|
+
description: 所有 UI 控件的基类,管理 frame、子视图与图层。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
所有 UI 控件的基类。通过 `new UIView(frame)` 或 `initWithFrame(frame)` 创建,frame 为 `{ x, y, width, height }`。可将插件面板添加到 `StudyController.view`。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性(常用)
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
|------|------|------|
|
|
14
|
+
| `frame` | CGRect | 位置与大小。 |
|
|
15
|
+
| `bounds` | CGRect | 内部坐标系。 |
|
|
16
|
+
| `backgroundColor` | UIColor | 背景色。 |
|
|
17
|
+
| `hidden` | boolean | 是否隐藏。 |
|
|
18
|
+
| `layer` | CALayer | 图层,可设置 cornerRadius、borderWidth、borderColor 等。 |
|
|
19
|
+
| `subviews` | NSArray | 子视图数组。 |
|
|
20
|
+
| `superview` | UIView | 父视图。 |
|
|
21
|
+
| `window` | UIWindow | 所在窗口。 |
|
|
22
|
+
| `tag` | number | 标签。 |
|
|
23
|
+
| `alpha` | number | 透明度。 |
|
|
24
|
+
| `autoresizingMask` | number | 自动调整掩码(如 1<<0 右边缘)。 |
|
|
25
|
+
|
|
26
|
+
### 方法(常用)
|
|
27
|
+
|
|
28
|
+
| 方法 | 说明 |
|
|
29
|
+
|------|------|
|
|
30
|
+
| `addSubview(view)` | 添加子视图。 |
|
|
31
|
+
| `removeFromSuperview()` | 从父视图移除。 |
|
|
32
|
+
| `insertSubviewBelowSubview(view, sibling)` | 插入到某子视图下方。 |
|
|
33
|
+
| `insertSubviewAboveSubview(view, sibling)` | 插入到某子视图上方。 |
|
|
34
|
+
| `viewWithTag(tag)` | 按 tag 查找子视图。 |
|
|
35
|
+
| `addGestureRecognizer(gestureRecognizer)` | 添加手势识别器。 |
|
|
36
|
+
| `removeGestureRecognizer(gestureRecognizer)` | 移除手势识别器。 |
|
|
37
|
+
| `gestureRecognizerShouldBegin(gestureRecognizer)` | 询问手势是否应开始(返回 boolean)。 |
|
|
38
|
+
|
|
39
|
+
## 类成员 (Class members)
|
|
40
|
+
|
|
41
|
+
当前运行时未额外暴露 `UIView` 的类成员。
|
|
42
|
+
|
|
43
|
+
## 相关
|
|
44
|
+
|
|
45
|
+
- [UIViewController](/reference/uikit/uiview-controller/)、[UIColor](/reference/uikit/uicolor/)
|
|
46
|
+
- [UIGestureRecognizer](/reference/uikit/uigesture-recognizer/)
|
|
47
|
+
- [教程:原生 UI](/guides/native-ui/)
|