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,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UICollectionViewLayoutAttributes
|
|
3
|
+
description: CollectionView 元素的布局属性对象。包含 frame/center/alpha/transform 等信息,并提供常用工厂方法。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UICollectionViewLayoutAttributes` 用于描述 cell/supplementary/decoration 元素在布局中的几何与显示属性。它常作为 `UICollectionView` 或 `UICollectionViewLayout` 的查询返回值出现。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `invalidateEverything` | boolean | 只读。表示一次失效是否影响所有布局。 |
|
|
15
|
+
| `invalidateDataSourceCounts` | boolean | 只读。表示数据源计数是否需要重新计算。 |
|
|
16
|
+
| `indexPathAfterUpdate` | NSIndexPath | 只读。更新后的 indexPath。 |
|
|
17
|
+
| `indexPathBeforeUpdate` | NSIndexPath | 只读。更新前的 indexPath。 |
|
|
18
|
+
| `collectionView` | UICollectionView | 只读。所属 collectionView。 |
|
|
19
|
+
| `representedElementKind` | string | 只读。元素 kind。 |
|
|
20
|
+
| `indexPath` | NSIndexPath | indexPath。 |
|
|
21
|
+
| `frame` | { x: number, y: number, width: number, height: number } | frame。 |
|
|
22
|
+
| `bounds` | { x: number, y: number, width: number, height: number } | bounds。 |
|
|
23
|
+
| `size` | { width: number, height: number } | size。 |
|
|
24
|
+
| `center` | { x: number, y: number } | center。 |
|
|
25
|
+
| `transform` | object | 二维仿射变换。 |
|
|
26
|
+
| `transform3D` | object | 三维变换。 |
|
|
27
|
+
| `alpha` | number | 透明度。 |
|
|
28
|
+
| `hidden` | boolean | 是否隐藏。 |
|
|
29
|
+
| `zIndex` | number | zIndex。 |
|
|
30
|
+
|
|
31
|
+
## 类成员 (Class members)
|
|
32
|
+
|
|
33
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| `layoutAttributesForCellWithIndexPath(indexPath)` | indexPath: NSIndexPath | UICollectionViewLayoutAttributes | 创建 cell 的布局属性。 |
|
|
36
|
+
| `layoutAttributesForSupplementaryViewOfKindWithIndexPath(elementKind, indexPath)` | elementKind: string, indexPath: NSIndexPath | UICollectionViewLayoutAttributes | 创建 supplementary view 的布局属性。 |
|
|
37
|
+
| `layoutAttributesForDecorationViewOfKindWithIndexPath(decorationViewKind, indexPath)` | decorationViewKind: string, indexPath: NSIndexPath | UICollectionViewLayoutAttributes | 创建 decoration view 的布局属性。 |
|
|
38
|
+
|
|
39
|
+
## 相关
|
|
40
|
+
|
|
41
|
+
- [UICollectionView](/reference/uikit/uicollection-view/)
|
|
42
|
+
- [UICollectionViewLayout](/reference/uikit/uicollection-view-layout/)
|
|
43
|
+
- [NSIndexPath](/reference/foundation/ns-index-path/)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UICollectionViewLayout
|
|
3
|
+
description: UICollectionView 的布局基类。负责提供元素布局属性、内容尺寸与滚动目标位置等。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UICollectionViewLayout` 用于为 [UICollectionView](/reference/uikit/uicollection-view/) 计算布局信息。插件运行时暴露了一组用于布局生命周期、注册 decoration view、查询布局属性与计算内容尺寸/目标偏移的成员。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `invalidateEverything` | boolean | 只读。表示一次失效是否影响所有布局。 |
|
|
15
|
+
| `invalidateDataSourceCounts` | boolean | 只读。表示数据源计数是否需要重新计算。 |
|
|
16
|
+
| `indexPathAfterUpdate` | NSIndexPath | 只读。更新后的 indexPath(用于动画/过渡场景)。 |
|
|
17
|
+
| `indexPathBeforeUpdate` | NSIndexPath | 只读。更新前的 indexPath(用于动画/过渡场景)。 |
|
|
18
|
+
| `collectionView` | UICollectionView | 只读。当前所属的 collectionView。 |
|
|
19
|
+
| `representedElementKind` | string | 只读。元素 kind 标识。 |
|
|
20
|
+
| `indexPath` | NSIndexPath | indexPath。 |
|
|
21
|
+
| `frame` | { x: number, y: number, width: number, height: number } | frame。 |
|
|
22
|
+
| `bounds` | { x: number, y: number, width: number, height: number } | bounds。 |
|
|
23
|
+
| `size` | { width: number, height: number } | size。 |
|
|
24
|
+
| `center` | { x: number, y: number } | center。 |
|
|
25
|
+
| `transform` | object | 二维仿射变换。 |
|
|
26
|
+
| `transform3D` | object | 三维变换。 |
|
|
27
|
+
| `alpha` | number | 透明度。 |
|
|
28
|
+
| `hidden` | boolean | 是否隐藏。 |
|
|
29
|
+
| `zIndex` | number | zIndex。 |
|
|
30
|
+
|
|
31
|
+
> 注意:以上属性中一部分在系统 UIKit 的语义上更常见于“布局属性对象”。这里以**插件运行时实际暴露**为准进行记录;如果你只在运行时把它当作数据结构读写,也完全可行。
|
|
32
|
+
|
|
33
|
+
### 方法
|
|
34
|
+
|
|
35
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| `invalidateLayout()` | — | void | 标记布局失效,触发重新计算。 |
|
|
38
|
+
| `registerClassForDecorationViewOfKind(viewClass, decorationViewKind)` | viewClass: id, decorationViewKind: string | void | 注册 decoration view 类型。 |
|
|
39
|
+
| `prepareLayout()` | — | void | 布局准备阶段回调。 |
|
|
40
|
+
| `layoutAttributesForElementsInRect(rect)` | rect: { x: number, y: number, width: number, height: number } | NSArray | 返回 rect 内元素的布局属性数组。 |
|
|
41
|
+
| `layoutAttributesForItemAtIndexPath(indexPath)` | indexPath: NSIndexPath | UICollectionViewLayoutAttributes \| null | 返回指定 item 的布局属性。 |
|
|
42
|
+
| `layoutAttributesForSupplementaryViewOfKindAtIndexPath(kind, indexPath)` | kind: string, indexPath: NSIndexPath | UICollectionViewLayoutAttributes \| null | 返回指定 supplementary view 的布局属性。 |
|
|
43
|
+
| `layoutAttributesForDecorationViewOfKindAtIndexPath(decorationViewKind, indexPath)` | decorationViewKind: string, indexPath: NSIndexPath | UICollectionViewLayoutAttributes \| null | 返回指定 decoration view 的布局属性。 |
|
|
44
|
+
| `shouldInvalidateLayoutForBoundsChange(newBounds)` | newBounds: { x: number, y: number, width: number, height: number } | boolean | bounds 变化时是否需要失效布局。 |
|
|
45
|
+
| `targetContentOffsetForProposedContentOffsetWithScrollingVelocity(proposedContentOffset, velocity)` | proposedContentOffset: { x: number, y: number }, velocity: { x: number, y: number } | { x: number, y: number } | 根据目标偏移与滚动速度修正最终停靠位置。 |
|
|
46
|
+
| `targetContentOffsetForProposedContentOffset(proposedContentOffset)` | proposedContentOffset: { x: number, y: number } | { x: number, y: number } | 根据目标偏移修正最终停靠位置。 |
|
|
47
|
+
| `collectionViewContentSize()` | — | { width: number, height: number } | 返回内容尺寸。 |
|
|
48
|
+
|
|
49
|
+
## 类成员 (Class members)
|
|
50
|
+
|
|
51
|
+
| 成员 | 返回值 | 说明 |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| `layoutAttributesClass()` | Class | 返回布局属性类。 |
|
|
54
|
+
| `invalidationContextClass()` | Class | 返回失效上下文类。 |
|
|
55
|
+
|
|
56
|
+
## 相关
|
|
57
|
+
|
|
58
|
+
- [UICollectionView](/reference/uikit/uicollection-view/)
|
|
59
|
+
- [UICollectionViewLayoutAttributes](/reference/uikit/uicollection-view-layout-attributes/)
|
|
60
|
+
- [NSIndexPath](/reference/foundation/ns-index-path/)、[NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UICollectionView
|
|
3
|
+
description: 网格/瀑布流式列表视图。支持注册与复用 cell、批量更新、查询布局属性与可见项。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UICollectionView` 是用于展示大量条目的滚动视图,继承自 [UIScrollView](/reference/uikit/uiscrollview/)。在插件运行时通常配合 `dataSource` 与 `collectionViewLayout` 使用,通过“注册 → 复用”机制创建 cell,并在需要时对 section/item 做增删改或批量更新。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `item` | number | 只读。运行时暴露的整数属性(常见于布局/交互状态字段)。 |
|
|
15
|
+
| `backgroundView` | UIView | 背景视图。 |
|
|
16
|
+
| `allowsMultipleSelection` | boolean | 是否允许多选。 |
|
|
17
|
+
| `allowsSelection` | boolean | 是否允许选中。 |
|
|
18
|
+
| `dataSource` | id | 数据源对象(由插件自定义对象承担)。 |
|
|
19
|
+
| `collectionViewLayout` | UICollectionViewLayout | 当前布局对象。 |
|
|
20
|
+
|
|
21
|
+
### 复用与注册
|
|
22
|
+
|
|
23
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `registerClassForCellWithReuseIdentifier(cellClass, identifier)` | cellClass: id, identifier: string | void | 注册 cell 类型与复用标识符。 |
|
|
26
|
+
| `registerClassForSupplementaryViewOfKindWithReuseIdentifier(viewClass, elementKind, identifier)` | viewClass: id, elementKind: string, identifier: string | void | 注册 supplementary view。 |
|
|
27
|
+
| `dequeueReusableCellWithReuseIdentifierForIndexPath(identifier, indexPath)` | identifier: string, indexPath: NSIndexPath | id | 取出复用 cell。 |
|
|
28
|
+
| `dequeueReusableSupplementaryViewOfKindWithReuseIdentifierForIndexPath(elementKind, identifier, indexPath)` | elementKind: string, identifier: string, indexPath: NSIndexPath | id | 取出复用 supplementary view。 |
|
|
29
|
+
|
|
30
|
+
### 选择与可见项
|
|
31
|
+
|
|
32
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
33
|
+
| --- | --- | --- | --- |
|
|
34
|
+
| `indexPathsForSelectedItems()` | — | NSArray | 当前选中项的 indexPath 列表。 |
|
|
35
|
+
| `deselectItemAtIndexPathAnimated(indexPath, animated)` | indexPath: NSIndexPath, animated: boolean | void | 取消选中。 |
|
|
36
|
+
| `visibleCells()` | — | NSArray | 当前可见的 cell 列表。 |
|
|
37
|
+
| `indexPathsForVisibleItems()` | — | NSArray | 当前可见项的 indexPath 列表。 |
|
|
38
|
+
|
|
39
|
+
### 数据刷新与布局切换
|
|
40
|
+
|
|
41
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
42
|
+
| --- | --- | --- | --- |
|
|
43
|
+
| `reloadData()` | — | void | 重新加载数据。 |
|
|
44
|
+
| `setCollectionViewLayoutAnimated(layout, animated)` | layout: UICollectionViewLayout, animated: boolean | void | 切换布局(可动画)。 |
|
|
45
|
+
| `setCollectionViewLayoutAnimatedCompletion(layout, animated, completion)` | layout: UICollectionViewLayout, animated: boolean, completion: (finished: boolean) => void | void | 切换布局并在完成后回调。 |
|
|
46
|
+
| `finishInteractiveTransition()` | — | void | 结束交互式转场。 |
|
|
47
|
+
| `cancelInteractiveTransition()` | — | void | 取消交互式转场。 |
|
|
48
|
+
|
|
49
|
+
### 查询
|
|
50
|
+
|
|
51
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
52
|
+
| --- | --- | --- | --- |
|
|
53
|
+
| `numberOfSections()` | — | number | section 数量。 |
|
|
54
|
+
| `numberOfItemsInSection(section)` | section: number | number | 指定 section 的 item 数量。 |
|
|
55
|
+
| `layoutAttributesForItemAtIndexPath(indexPath)` | indexPath: NSIndexPath | UICollectionViewLayoutAttributes | 获取指定 item 的布局属性。 |
|
|
56
|
+
| `layoutAttributesForSupplementaryElementOfKindAtIndexPath(kind, indexPath)` | kind: string, indexPath: NSIndexPath | UICollectionViewLayoutAttributes | 获取 supplementary element 的布局属性。 |
|
|
57
|
+
| `indexPathForItemAtPoint(point)` | point: { x: number, y: number } | NSIndexPath \| null | 根据点坐标反查 item 的 indexPath。 |
|
|
58
|
+
| `indexPathForCell(cell)` | cell: UICollectionViewCell | NSIndexPath \| null | 根据 cell 反查 indexPath。 |
|
|
59
|
+
| `cellForItemAtIndexPath(indexPath)` | indexPath: NSIndexPath | UICollectionViewCell \| null | 返回当前已创建并可见的 cell(不可见则可能为 null)。 |
|
|
60
|
+
|
|
61
|
+
### 增删改与批量更新
|
|
62
|
+
|
|
63
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
64
|
+
| --- | --- | --- | --- |
|
|
65
|
+
| `insertSections(sections)` | sections: NSIndexSet | void | 插入 section。 |
|
|
66
|
+
| `deleteSections(sections)` | sections: NSIndexSet | void | 删除 section。 |
|
|
67
|
+
| `reloadSections(sections)` | sections: NSIndexSet | void | 刷新 section。 |
|
|
68
|
+
| `moveSectionToSection(section, newSection)` | section: number, newSection: number | void | 移动 section。 |
|
|
69
|
+
| `insertItemsAtIndexPaths(indexPaths)` | indexPaths: NSArray | void | 插入 item。 |
|
|
70
|
+
| `deleteItemsAtIndexPaths(indexPaths)` | indexPaths: NSArray | void | 删除 item。 |
|
|
71
|
+
| `reloadItemsAtIndexPaths(indexPaths)` | indexPaths: NSArray | void | 刷新 item。 |
|
|
72
|
+
| `moveItemAtIndexPathToIndexPath(indexPath, newIndexPath)` | indexPath: NSIndexPath, newIndexPath: NSIndexPath | void | 移动 item。 |
|
|
73
|
+
| `performBatchUpdatesCompletion(updates, completion)` | updates: () => void, completion: (finished: boolean) => void | void | 在一次批量更新中执行多项增删改,并在完成后回调。 |
|
|
74
|
+
|
|
75
|
+
## 类成员 (Class members)
|
|
76
|
+
|
|
77
|
+
当前运行时未额外暴露 `UICollectionView` 的类成员。
|
|
78
|
+
|
|
79
|
+
## 相关
|
|
80
|
+
|
|
81
|
+
- [UIScrollView](/reference/uikit/uiscrollview/)、[UIView](/reference/uikit/uiview/)
|
|
82
|
+
- [UICollectionViewLayout](/reference/uikit/uicollection-view-layout/)、[UICollectionViewLayoutAttributes](/reference/uikit/uicollection-view-layout-attributes/)
|
|
83
|
+
- [NSIndexPath](/reference/foundation/ns-index-path/)、[NSIndexSet](/reference/foundation/ns-index-set/)、[NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIColor
|
|
3
|
+
description: 颜色对象,用于视图背景、文本等。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
颜色对象。部分环境提供 `colorWithHexString(hex)`(如 "#FF0000");否则使用 RGB/灰度 API。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
`UIColor` 的实例通常作为“值对象”被传递与使用(例如赋给 `UIView.backgroundColor`、`UILabel.textColor`、`CALayer.borderColor` 等)。如果你需要把颜色转换为可读字符串,可关注运行时是否提供 `stringValue` / `hexStringValue` 等只读属性(站内搜索即可定位)。
|
|
11
|
+
|
|
12
|
+
## 类成员 (Class members)
|
|
13
|
+
|
|
14
|
+
| 方法 | 参数 | 说明 |
|
|
15
|
+
|------|------|------|
|
|
16
|
+
| `colorWithRedGreenBlueAlpha(red, green, blue, alpha)` | 0–1 | RGBA。 |
|
|
17
|
+
| `colorWithWhiteAlpha(white, alpha)` | white, alpha 0–1 | 灰度。 |
|
|
18
|
+
| `colorWithHexString(hex)` | 如 "#FF0000" | 十六进制(若支持)。 |
|
|
19
|
+
| `blackColor()` / `whiteColor()` / `grayColor()` / `redColor()` / `greenColor()` / `blueColor()` / `clearColor()` | — | 预设颜色。 |
|
|
20
|
+
|
|
21
|
+
## 相关
|
|
22
|
+
|
|
23
|
+
- [UIView](/reference/uikit/uiview/)、[UILabel](/reference/uikit/uilabel/)
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIControl
|
|
3
|
+
description: 控件基类(target/action 事件机制)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIControl` 是交互控件基类(`UIButton`、`UISwitch`、`UISlider` 等都继承它)。提供 target/action 的事件机制与状态(enabled/selected/highlighted 等)。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
`UIControl` 的核心是事件绑定与派发:你通常会在控件实例上调用 `addTargetAction...` / `removeTargetAction...` / `sendActionsForControlEvents...` 等成员(具体名称以运行时实际暴露为准,可站内搜索定位)。
|
|
11
|
+
|
|
12
|
+
## 类成员 (Class members)
|
|
13
|
+
|
|
14
|
+
当前运行时未额外暴露 `UIControl` 的类成员。
|
|
15
|
+
|
|
16
|
+
## 提示
|
|
17
|
+
|
|
18
|
+
- 常用方法集中在 `addTargetAction(...)` / `removeTargetAction(...)` / `sendActionsForControlEvents(...)` 等。
|
|
19
|
+
- 具体成员建议用站内搜索成员名。
|
|
20
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIDatePicker
|
|
3
|
+
description: 日期/时间选择控件。支持时区/语言环境、最小/最大日期与倒计时模式。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIDatePicker` 是用于选择日期/时间或倒计时的控件,继承自 [UIControl](/reference/uikit/uicontrol/)。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `locale` | NSLocale | 语言/地区设置。 |
|
|
15
|
+
| `datePickerMode` | number | 模式(日期、时间、日期时间、倒计时等)。 |
|
|
16
|
+
| `timeZone` | NSTimeZone | 时区。 |
|
|
17
|
+
| `countDownDuration` | number | 倒计时持续时长(秒)。 |
|
|
18
|
+
| `minuteInterval` | number | 分钟步进。 |
|
|
19
|
+
| `date` | NSDate | 当前选中日期。 |
|
|
20
|
+
| `minimumDate` | NSDate \| null | 最小可选日期。 |
|
|
21
|
+
| `maximumDate` | NSDate \| null | 最大可选日期。 |
|
|
22
|
+
| `calendar` | id | 日历对象。 |
|
|
23
|
+
|
|
24
|
+
### 方法
|
|
25
|
+
|
|
26
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
27
|
+
| --- | --- | --- | --- |
|
|
28
|
+
| `setDateAnimated(date, animated)` | date: NSDate, animated: boolean | void | 设置日期(可动画)。 |
|
|
29
|
+
|
|
30
|
+
## 类成员 (Class members)
|
|
31
|
+
|
|
32
|
+
当前运行时未额外暴露 `UIDatePicker` 的类成员。
|
|
33
|
+
|
|
34
|
+
## 相关
|
|
35
|
+
|
|
36
|
+
- [UIControl](/reference/uikit/uicontrol/)
|
|
37
|
+
- [NSDate](/reference/foundation/ns-date/)、[NSTimeZone](/reference/foundation/ns-time-zone/)、[NSLocale](/reference/foundation/ns-locale/)
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIDevice
|
|
3
|
+
description: 设备信息入口(单例),读取系统版本、设备型号、标识符等。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIDevice` 提供设备与系统信息读取能力。在插件里常用于判断系统版本、设备类型(iPad/mac 等场景需结合 `Application.osType` 等)。
|
|
7
|
+
|
|
8
|
+
## 类成员 (Class members)
|
|
9
|
+
|
|
10
|
+
### `currentDevice`
|
|
11
|
+
|
|
12
|
+
当前设备单例。
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
static currentDevice(): UIDevice
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Return Value:**
|
|
19
|
+
|
|
20
|
+
- `UIDevice`: 设备实例。
|
|
21
|
+
|
|
22
|
+
## 实例成员 (Instance members)
|
|
23
|
+
|
|
24
|
+
### 属性(只读)
|
|
25
|
+
|
|
26
|
+
| 属性 | 类型 | 说明 |
|
|
27
|
+
| :--- | :--- | :--- |
|
|
28
|
+
| `name` | `string` | 设备名称。 |
|
|
29
|
+
| `model` | `string` | 型号。 |
|
|
30
|
+
| `localizedModel` | `string` | 本地化型号。 |
|
|
31
|
+
| `systemName` | `string` | 系统名。 |
|
|
32
|
+
| `systemVersion` | `string` | 系统版本。 |
|
|
33
|
+
| `identifierForVendor` | `any` | 厂商标识。 |
|
|
34
|
+
| `userInterfaceIdiom` | `number` | 界面风格(手机/平板等)。 |
|
|
35
|
+
| `orientation` | `number` | 设备方向。 |
|
|
36
|
+
| `batteryLevel` | `number` | 电量(0~1)。 |
|
|
37
|
+
| `proximityState` | `number` | 接近传感器状态。 |
|
|
38
|
+
| `multitaskingSupported` | `boolean` | 是否支持多任务。 |
|
|
39
|
+
| `generatesDeviceOrientationNotifications` | `boolean` | 是否正在生成方向通知。 |
|
|
40
|
+
| `enableInputClicksWhenVisible` | `boolean` | 可见时是否允许输入点击。 |
|
|
41
|
+
|
|
42
|
+
### 属性(可读写)
|
|
43
|
+
|
|
44
|
+
| 属性 | 类型 | 说明 |
|
|
45
|
+
| :--- | :--- | :--- |
|
|
46
|
+
| `proximityMonitoringEnabled` | `boolean` | 是否开启接近监测。 |
|
|
47
|
+
| `batteryMonitoringEnabled` | `boolean` | 是否开启电量监测。 |
|
|
48
|
+
|
|
49
|
+
### `beginGeneratingDeviceOrientationNotifications`
|
|
50
|
+
|
|
51
|
+
开始生成设备方向通知。
|
|
52
|
+
|
|
53
|
+
```javascript
|
|
54
|
+
beginGeneratingDeviceOrientationNotifications(): void
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
**Return Value:**
|
|
58
|
+
|
|
59
|
+
- 无。
|
|
60
|
+
|
|
61
|
+
### `endGeneratingDeviceOrientationNotifications`
|
|
62
|
+
|
|
63
|
+
停止生成设备方向通知。
|
|
64
|
+
|
|
65
|
+
```javascript
|
|
66
|
+
endGeneratingDeviceOrientationNotifications(): void
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Return Value:**
|
|
70
|
+
|
|
71
|
+
- 无。
|
|
72
|
+
|
|
73
|
+
### `playInputClick`
|
|
74
|
+
|
|
75
|
+
播放输入点击音效。
|
|
76
|
+
|
|
77
|
+
```javascript
|
|
78
|
+
playInputClick(): void
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
**Return Value:**
|
|
82
|
+
|
|
83
|
+
- 无。
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIEvent
|
|
3
|
+
description: 触摸/系统事件对象。可查询事件类型、时间戳与 touches 集合。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIEvent` 表示一次输入事件(常见为触摸事件),通常在 `UIResponder` 的触摸回调或 `UIGestureRecognizer` 相关流程中出现。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `type` | number | 只读。事件类型。 |
|
|
15
|
+
| `subtype` | number | 只读。事件子类型。 |
|
|
16
|
+
| `timestamp` | number | 只读。事件时间戳(秒)。 |
|
|
17
|
+
|
|
18
|
+
### 方法
|
|
19
|
+
|
|
20
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
21
|
+
| --- | --- | --- | --- |
|
|
22
|
+
| `allTouches()` | — | NSSet | 返回事件包含的全部触摸对象集合。 |
|
|
23
|
+
| `touchesForWindow(window)` | window: UIWindow | NSSet | 返回特定 window 下的触摸集合。 |
|
|
24
|
+
| `touchesForView(view)` | view: UIView | NSSet | 返回特定 view 下的触摸集合。 |
|
|
25
|
+
| `touchesForGestureRecognizer(gesture)` | gesture: UIGestureRecognizer | NSSet | 返回特定手势识别器相关的触摸集合。 |
|
|
26
|
+
|
|
27
|
+
## 类成员 (Class members)
|
|
28
|
+
|
|
29
|
+
当前运行时未额外暴露 `UIEvent` 的类成员。
|
|
30
|
+
|
|
31
|
+
## 相关
|
|
32
|
+
|
|
33
|
+
- [UIResponder](/reference/uikit/uiresponder/)(触摸回调)
|
|
34
|
+
- [UIGestureRecognizer](/reference/uikit/uigesture-recognizer/)
|
|
35
|
+
- [UIView](/reference/uikit/uiview/)(view 参数)
|
|
36
|
+
- [NSSet](/reference/foundation/ns-set/)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIFont
|
|
3
|
+
description: 字体对象。提供系统字体/粗体/斜体、按名称创建,以及枚举字体家族与字体名。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIFont` 表示字体。插件运行时主要使用其**类成员**创建字体(系统字体、指定名称字体、按文本风格获取偏好字体),并可在需要时基于已有字体生成新字号的字体对象。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
11
|
+
| --- | --- | --- | --- |
|
|
12
|
+
| `fontWithSize(fontSize)` | fontSize: number | UIFont | 以相同字体族/风格生成指定字号的新字体。 |
|
|
13
|
+
|
|
14
|
+
## 类成员 (Class members)
|
|
15
|
+
|
|
16
|
+
### 常用字号
|
|
17
|
+
|
|
18
|
+
| 成员 | 返回值 | 说明 |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| `labelFontSize()` | number | label 默认字号。 |
|
|
21
|
+
| `buttonFontSize()` | number | button 默认字号。 |
|
|
22
|
+
| `smallSystemFontSize()` | number | 小号系统字体字号。 |
|
|
23
|
+
| `systemFontSize()` | number | 系统默认字号。 |
|
|
24
|
+
|
|
25
|
+
### 创建与查询
|
|
26
|
+
|
|
27
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
28
|
+
| --- | --- | --- | --- |
|
|
29
|
+
| `preferredFontForTextStyle(style)` | style: string | UIFont | 按文本风格获取偏好字体。 |
|
|
30
|
+
| `fontWithNameSize(fontName, fontSize)` | fontName: string, fontSize: number | UIFont \| null | 以名称创建字体。 |
|
|
31
|
+
| `familyNames()` | — | NSArray | 返回所有字体家族名。 |
|
|
32
|
+
| `fontNamesForFamilyName(familyName)` | familyName: string | NSArray | 返回指定家族下的字体名列表。 |
|
|
33
|
+
| `systemFontOfSize(fontSize)` | fontSize: number | UIFont | 系统字体。 |
|
|
34
|
+
| `boldSystemFontOfSize(fontSize)` | fontSize: number | UIFont | 粗体系统字体。 |
|
|
35
|
+
| `italicSystemFontOfSize(fontSize)` | fontSize: number | UIFont | 斜体系统字体。 |
|
|
36
|
+
|
|
37
|
+
## 相关
|
|
38
|
+
|
|
39
|
+
- [NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIGestureRecognizer
|
|
3
|
+
description: 手势识别器基类(tap/pan/pinch 等的基础)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIGestureRecognizer` 是手势识别器基类,常见子类包括 tap/pan/pinch/longPress/rotation/swipe 等。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| :--- | :--- | :--- |
|
|
14
|
+
| `state` | `number` | 手势状态。 |
|
|
15
|
+
| `enabled` | `boolean` | 是否启用。 |
|
|
16
|
+
| `view` | `UIView` | 附加的视图。 |
|
|
17
|
+
| `delegate` | `any` | 委托。 |
|
|
18
|
+
| `cancelsTouchesInView` | `boolean` | 是否取消视图中的触摸。 |
|
|
19
|
+
| `delaysTouchesBegan` | `boolean` | 是否延迟 touchesBegan。 |
|
|
20
|
+
| `delaysTouchesEnded` | `boolean` | 是否延迟 touchesEnded。 |
|
|
21
|
+
|
|
22
|
+
### `initWithTargetAction`
|
|
23
|
+
|
|
24
|
+
用 target 与 action 初始化。
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
initWithTargetAction(target: any, action: string): void
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Parameters:**
|
|
31
|
+
|
|
32
|
+
| Name | Type | Description |
|
|
33
|
+
| :--- | :--- | :--- |
|
|
34
|
+
| `target` | `any` | 目标对象。 |
|
|
35
|
+
| `action` | `string` | 方法名。 |
|
|
36
|
+
|
|
37
|
+
**Return Value:**
|
|
38
|
+
|
|
39
|
+
- 无。
|
|
40
|
+
|
|
41
|
+
### `addTargetAction`
|
|
42
|
+
|
|
43
|
+
添加 target-action。
|
|
44
|
+
|
|
45
|
+
```javascript
|
|
46
|
+
addTargetAction(target: any, action: string): void
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Parameters:**
|
|
50
|
+
|
|
51
|
+
| Name | Type | Description |
|
|
52
|
+
| :--- | :--- | :--- |
|
|
53
|
+
| `target` | `any` | 目标对象。 |
|
|
54
|
+
| `action` | `string` | 方法名。 |
|
|
55
|
+
|
|
56
|
+
**Return Value:**
|
|
57
|
+
|
|
58
|
+
- 无。
|
|
59
|
+
|
|
60
|
+
### `removeTargetAction`
|
|
61
|
+
|
|
62
|
+
移除 target-action。
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
removeTargetAction(target: any, action: string): void
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Parameters:**
|
|
69
|
+
|
|
70
|
+
| Name | Type | Description |
|
|
71
|
+
| :--- | :--- | :--- |
|
|
72
|
+
| `target` | `any` | 目标对象。 |
|
|
73
|
+
| `action` | `string` | 方法名。 |
|
|
74
|
+
|
|
75
|
+
**Return Value:**
|
|
76
|
+
|
|
77
|
+
- 无。
|
|
78
|
+
|
|
79
|
+
### `requireGestureRecognizerToFail`
|
|
80
|
+
|
|
81
|
+
要求另一手势失败后才识别。
|
|
82
|
+
|
|
83
|
+
```javascript
|
|
84
|
+
requireGestureRecognizerToFail(otherGestureRecognizer: UIGestureRecognizer): void
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Parameters:**
|
|
88
|
+
|
|
89
|
+
| Name | Type | Description |
|
|
90
|
+
| :--- | :--- | :--- |
|
|
91
|
+
| `otherGestureRecognizer` | `UIGestureRecognizer` | 另一手势识别器。 |
|
|
92
|
+
|
|
93
|
+
**Return Value:**
|
|
94
|
+
|
|
95
|
+
- 无。
|
|
96
|
+
|
|
97
|
+
### `locationInView`
|
|
98
|
+
|
|
99
|
+
手势在视图中的位置。
|
|
100
|
+
|
|
101
|
+
```javascript
|
|
102
|
+
locationInView(view: UIView): any
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Parameters:**
|
|
106
|
+
|
|
107
|
+
| Name | Type | Description |
|
|
108
|
+
| :--- | :--- | :--- |
|
|
109
|
+
| `view` | `UIView` | 参考视图。 |
|
|
110
|
+
|
|
111
|
+
**Return Value:**
|
|
112
|
+
|
|
113
|
+
- `any`: 点(如 { x, y })。
|
|
114
|
+
|
|
115
|
+
### `numberOfTouches`
|
|
116
|
+
|
|
117
|
+
当前触摸点数。
|
|
118
|
+
|
|
119
|
+
```javascript
|
|
120
|
+
numberOfTouches(): number
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Return Value:**
|
|
124
|
+
|
|
125
|
+
- `number`: 触摸点数。
|
|
126
|
+
|
|
127
|
+
### `locationOfTouchInView`
|
|
128
|
+
|
|
129
|
+
指定触摸在视图中的位置。
|
|
130
|
+
|
|
131
|
+
```javascript
|
|
132
|
+
locationOfTouchInView(touchIndex: number, view: UIView): any
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**Parameters:**
|
|
136
|
+
|
|
137
|
+
| Name | Type | Description |
|
|
138
|
+
| :--- | :--- | :--- |
|
|
139
|
+
| `touchIndex` | `number` | 触摸索引。 |
|
|
140
|
+
| `view` | `UIView` | 参考视图。 |
|
|
141
|
+
|
|
142
|
+
**Return Value:**
|
|
143
|
+
|
|
144
|
+
- `any`: 点(如 { x, y })。
|
|
145
|
+
|
|
146
|
+
## 类成员 (Class members)
|
|
147
|
+
|
|
148
|
+
当前运行时未额外暴露 `UIGestureRecognizer` 的类成员。
|
|
149
|
+
|
|
150
|
+
## 相关
|
|
151
|
+
|
|
152
|
+
- `UITapGestureRecognizer`、`UIPanGestureRecognizer`、`UIPinchGestureRecognizer`、`UILongPressGestureRecognizer`、`UIRotationGestureRecognizer`、`UISwipeGestureRecognizer`
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIImagePickerController
|
|
3
|
+
description: 系统媒体选择/拍摄控制器。支持选择来源、媒体类型、拍照与视频录制控制。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIImagePickerController` 用于从相册/相机选择图片或视频,或直接拍摄。它在插件运行时以控制器形式出现,常配合导航控制器/弹出层展示。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `videoMaximumDuration` | number | 视频最大时长(秒)。 |
|
|
15
|
+
| `mediaTypes` | NSArray | 可选媒体类型列表。 |
|
|
16
|
+
| `sourceType` | number | 来源类型(相机/相册等)。 |
|
|
17
|
+
| `allowsEditing` | boolean | 是否允许编辑。 |
|
|
18
|
+
| `allowsImageEditing` | boolean | 是否允许图片编辑(旧字段,部分环境仍存在)。 |
|
|
19
|
+
| `cameraOverlayView` | UIView | 相机覆盖层视图。 |
|
|
20
|
+
| `cameraViewTransform` | object | 相机预览变换。 |
|
|
21
|
+
| `showsCameraControls` | boolean | 是否显示系统相机控件。 |
|
|
22
|
+
|
|
23
|
+
### 方法
|
|
24
|
+
|
|
25
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
26
|
+
| --- | --- | --- | --- |
|
|
27
|
+
| `takePicture()` | — | void | 触发拍照。 |
|
|
28
|
+
| `startVideoCapture()` | — | boolean | 开始录制视频。 |
|
|
29
|
+
| `stopVideoCapture()` | — | void | 停止录制视频。 |
|
|
30
|
+
|
|
31
|
+
## 类成员 (Class members)
|
|
32
|
+
|
|
33
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
34
|
+
| --- | --- | --- | --- |
|
|
35
|
+
| `isSourceTypeAvailable(sourceType)` | sourceType: number | boolean | 判断某来源是否可用。 |
|
|
36
|
+
| `availableMediaTypesForSourceType(sourceType)` | sourceType: number | NSArray | 返回某来源可用的媒体类型列表。 |
|
|
37
|
+
|
|
38
|
+
## 相关
|
|
39
|
+
|
|
40
|
+
- [UIView](/reference/uikit/uiview/)
|
|
41
|
+
- [NSArray](/reference/foundation/ns-array/)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: UIImageView
|
|
3
|
+
description: 图片视图。支持设置 image/highlightedImage 与帧动画(animationImages)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`UIImageView` 继承自 [UIView](/reference/uikit/uiview/),用于显示图片,或通过 `animationImages` 播放简单的帧动画。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
### 属性
|
|
11
|
+
|
|
12
|
+
| 属性 | 类型 | 说明 |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| `image` | UIImage \| null | 当前显示的图片。 |
|
|
15
|
+
| `highlightedImage` | UIImage \| null | 高亮状态下的图片。 |
|
|
16
|
+
| `highlighted` | boolean | 是否高亮。 |
|
|
17
|
+
| `animationImages` | NSArray | 帧动画图片数组。 |
|
|
18
|
+
| `highlightedAnimationImages` | NSArray | 高亮状态下的帧动画图片数组。 |
|
|
19
|
+
| `animationDuration` | number | 动画时长(秒)。 |
|
|
20
|
+
| `animationRepeatCount` | number | 重复次数(0 通常表示无限)。 |
|
|
21
|
+
|
|
22
|
+
### 方法
|
|
23
|
+
|
|
24
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
25
|
+
| --- | --- | --- | --- |
|
|
26
|
+
| `startAnimating()` | — | void | 开始播放帧动画。 |
|
|
27
|
+
| `stopAnimating()` | — | void | 停止播放帧动画。 |
|
|
28
|
+
| `isAnimating()` | — | boolean | 是否正在播放。 |
|
|
29
|
+
|
|
30
|
+
## 类成员 (Class members)
|
|
31
|
+
|
|
32
|
+
当前运行时未额外暴露 `UIImageView` 的类成员。
|
|
33
|
+
|
|
34
|
+
## 相关
|
|
35
|
+
|
|
36
|
+
- [UIView](/reference/uikit/uiview/)
|
|
37
|
+
- [UIImage](/reference/uikit/uiimage/)
|
|
38
|
+
- [NSArray](/reference/foundation/ns-array/)
|