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,527 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NSIndexSet
|
|
3
|
+
description: 索引集合(用于表示一组整数索引,支持范围与枚举)。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
`NSIndexSet` 表示一组整数索引的集合,常用于批量索引操作(例如取出数组的多个位置、枚举索引范围等)。
|
|
7
|
+
|
|
8
|
+
## 类成员 (Class members)
|
|
9
|
+
|
|
10
|
+
### `indexSet`
|
|
11
|
+
|
|
12
|
+
返回空索引集。
|
|
13
|
+
|
|
14
|
+
```javascript
|
|
15
|
+
static indexSet(): NSIndexSet
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Return Value:**
|
|
19
|
+
|
|
20
|
+
- `NSIndexSet`: 空索引集。
|
|
21
|
+
|
|
22
|
+
### `indexSetWithIndex`
|
|
23
|
+
|
|
24
|
+
从单个索引创建。
|
|
25
|
+
|
|
26
|
+
```javascript
|
|
27
|
+
static indexSetWithIndex(value: number): NSIndexSet
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**Parameters:**
|
|
31
|
+
|
|
32
|
+
| Name | Type | Description |
|
|
33
|
+
| :--- | :--- | :--- |
|
|
34
|
+
| `value` | `number` | 索引值。 |
|
|
35
|
+
|
|
36
|
+
**Return Value:**
|
|
37
|
+
|
|
38
|
+
- `NSIndexSet`: 新索引集。
|
|
39
|
+
|
|
40
|
+
### `indexSetWithIndexesInRange`
|
|
41
|
+
|
|
42
|
+
从范围创建。
|
|
43
|
+
|
|
44
|
+
```javascript
|
|
45
|
+
static indexSetWithIndexesInRange(range: any): NSIndexSet
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Parameters:**
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description |
|
|
51
|
+
| :--- | :--- | :--- |
|
|
52
|
+
| `range` | `any` | 范围(如 { location, length })。 |
|
|
53
|
+
|
|
54
|
+
**Return Value:**
|
|
55
|
+
|
|
56
|
+
- `NSIndexSet`: 新索引集。
|
|
57
|
+
|
|
58
|
+
## 实例成员 (Instance members)
|
|
59
|
+
|
|
60
|
+
### `count`
|
|
61
|
+
|
|
62
|
+
索引个数。
|
|
63
|
+
|
|
64
|
+
```javascript
|
|
65
|
+
count(): number
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Return Value:**
|
|
69
|
+
|
|
70
|
+
- `number`: 索引个数。
|
|
71
|
+
|
|
72
|
+
### `firstIndex`
|
|
73
|
+
|
|
74
|
+
最小索引。
|
|
75
|
+
|
|
76
|
+
```javascript
|
|
77
|
+
firstIndex(): number
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Return Value:**
|
|
81
|
+
|
|
82
|
+
- `number`: 最小索引,空集为 NSNotFound。
|
|
83
|
+
|
|
84
|
+
### `lastIndex`
|
|
85
|
+
|
|
86
|
+
最大索引。
|
|
87
|
+
|
|
88
|
+
```javascript
|
|
89
|
+
lastIndex(): number
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Return Value:**
|
|
93
|
+
|
|
94
|
+
- `number`: 最大索引,空集为 NSNotFound。
|
|
95
|
+
|
|
96
|
+
### `containsIndex`
|
|
97
|
+
|
|
98
|
+
是否包含某索引。
|
|
99
|
+
|
|
100
|
+
```javascript
|
|
101
|
+
containsIndex(value: number): boolean
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Parameters:**
|
|
105
|
+
|
|
106
|
+
| Name | Type | Description |
|
|
107
|
+
| :--- | :--- | :--- |
|
|
108
|
+
| `value` | `number` | 索引。 |
|
|
109
|
+
|
|
110
|
+
**Return Value:**
|
|
111
|
+
|
|
112
|
+
- `boolean`: 是否包含。
|
|
113
|
+
|
|
114
|
+
### `containsIndexesInRange`
|
|
115
|
+
|
|
116
|
+
是否包含整个范围。
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
containsIndexesInRange(range: any): boolean
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
**Parameters:**
|
|
123
|
+
|
|
124
|
+
| Name | Type | Description |
|
|
125
|
+
| :--- | :--- | :--- |
|
|
126
|
+
| `range` | `any` | 范围。 |
|
|
127
|
+
|
|
128
|
+
**Return Value:**
|
|
129
|
+
|
|
130
|
+
- `boolean`: 是否包含。
|
|
131
|
+
|
|
132
|
+
### `containsIndexes`
|
|
133
|
+
|
|
134
|
+
是否包含另一索引集的所有索引。
|
|
135
|
+
|
|
136
|
+
```javascript
|
|
137
|
+
containsIndexes(indexSet: NSIndexSet): boolean
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Parameters:**
|
|
141
|
+
|
|
142
|
+
| Name | Type | Description |
|
|
143
|
+
| :--- | :--- | :--- |
|
|
144
|
+
| `indexSet` | `NSIndexSet` | 另一索引集。 |
|
|
145
|
+
|
|
146
|
+
**Return Value:**
|
|
147
|
+
|
|
148
|
+
- `boolean`: 是否包含。
|
|
149
|
+
|
|
150
|
+
### `intersectsIndexesInRange`
|
|
151
|
+
|
|
152
|
+
是否与范围有交集。
|
|
153
|
+
|
|
154
|
+
```javascript
|
|
155
|
+
intersectsIndexesInRange(range: any): boolean
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Parameters:**
|
|
159
|
+
|
|
160
|
+
| Name | Type | Description |
|
|
161
|
+
| :--- | :--- | :--- |
|
|
162
|
+
| `range` | `any` | 范围。 |
|
|
163
|
+
|
|
164
|
+
**Return Value:**
|
|
165
|
+
|
|
166
|
+
- `boolean`: 是否有交集。
|
|
167
|
+
|
|
168
|
+
### `countOfIndexesInRange`
|
|
169
|
+
|
|
170
|
+
范围内包含的索引个数。
|
|
171
|
+
|
|
172
|
+
```javascript
|
|
173
|
+
countOfIndexesInRange(range: any): number
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
**Parameters:**
|
|
177
|
+
|
|
178
|
+
| Name | Type | Description |
|
|
179
|
+
| :--- | :--- | :--- |
|
|
180
|
+
| `range` | `any` | 范围。 |
|
|
181
|
+
|
|
182
|
+
**Return Value:**
|
|
183
|
+
|
|
184
|
+
- `number`: 个数。
|
|
185
|
+
|
|
186
|
+
### `isEqualToIndexSet`
|
|
187
|
+
|
|
188
|
+
是否与另一索引集相等。
|
|
189
|
+
|
|
190
|
+
```javascript
|
|
191
|
+
isEqualToIndexSet(indexSet: NSIndexSet): boolean
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
**Parameters:**
|
|
195
|
+
|
|
196
|
+
| Name | Type | Description |
|
|
197
|
+
| :--- | :--- | :--- |
|
|
198
|
+
| `indexSet` | `NSIndexSet` | 另一索引集。 |
|
|
199
|
+
|
|
200
|
+
**Return Value:**
|
|
201
|
+
|
|
202
|
+
- `boolean`: 是否相等。
|
|
203
|
+
|
|
204
|
+
### `indexGreaterThanIndex`
|
|
205
|
+
|
|
206
|
+
大于给定索引的最小索引。
|
|
207
|
+
|
|
208
|
+
```javascript
|
|
209
|
+
indexGreaterThanIndex(value: number): number
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**Parameters:**
|
|
213
|
+
|
|
214
|
+
| Name | Type | Description |
|
|
215
|
+
| :--- | :--- | :--- |
|
|
216
|
+
| `value` | `number` | 给定索引。 |
|
|
217
|
+
|
|
218
|
+
**Return Value:**
|
|
219
|
+
|
|
220
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
221
|
+
|
|
222
|
+
### `indexLessThanIndex`
|
|
223
|
+
|
|
224
|
+
小于给定索引的最大索引。
|
|
225
|
+
|
|
226
|
+
```javascript
|
|
227
|
+
indexLessThanIndex(value: number): number
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
**Parameters:**
|
|
231
|
+
|
|
232
|
+
| Name | Type | Description |
|
|
233
|
+
| :--- | :--- | :--- |
|
|
234
|
+
| `value` | `number` | 给定索引。 |
|
|
235
|
+
|
|
236
|
+
**Return Value:**
|
|
237
|
+
|
|
238
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
239
|
+
|
|
240
|
+
### `indexGreaterThanOrEqualToIndex`
|
|
241
|
+
|
|
242
|
+
大于等于给定索引的最小索引。
|
|
243
|
+
|
|
244
|
+
```javascript
|
|
245
|
+
indexGreaterThanOrEqualToIndex(value: number): number
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
**Parameters:**
|
|
249
|
+
|
|
250
|
+
| Name | Type | Description |
|
|
251
|
+
| :--- | :--- | :--- |
|
|
252
|
+
| `value` | `number` | 给定索引。 |
|
|
253
|
+
|
|
254
|
+
**Return Value:**
|
|
255
|
+
|
|
256
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
257
|
+
|
|
258
|
+
### `indexLessThanOrEqualToIndex`
|
|
259
|
+
|
|
260
|
+
小于等于给定索引的最大索引。
|
|
261
|
+
|
|
262
|
+
```javascript
|
|
263
|
+
indexLessThanOrEqualToIndex(value: number): number
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
**Parameters:**
|
|
267
|
+
|
|
268
|
+
| Name | Type | Description |
|
|
269
|
+
| :--- | :--- | :--- |
|
|
270
|
+
| `value` | `number` | 给定索引。 |
|
|
271
|
+
|
|
272
|
+
**Return Value:**
|
|
273
|
+
|
|
274
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
275
|
+
|
|
276
|
+
### `getIndexesMaxCountInIndexRange`
|
|
277
|
+
|
|
278
|
+
将范围内索引写入缓冲区。
|
|
279
|
+
|
|
280
|
+
```javascript
|
|
281
|
+
getIndexesMaxCountInIndexRange(indexBuffer: any, bufferSize: number, range: any): number
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Parameters:**
|
|
285
|
+
|
|
286
|
+
| Name | Type | Description |
|
|
287
|
+
| :--- | :--- | :--- |
|
|
288
|
+
| `indexBuffer` | `any` | 目标缓冲区。 |
|
|
289
|
+
| `bufferSize` | `number` | 缓冲区大小。 |
|
|
290
|
+
| `range` | `any` | 范围。 |
|
|
291
|
+
|
|
292
|
+
**Return Value:**
|
|
293
|
+
|
|
294
|
+
- `number`: 写入的索引个数。
|
|
295
|
+
|
|
296
|
+
### `enumerateIndexesUsingBlock`
|
|
297
|
+
|
|
298
|
+
用 block 遍历每个索引。
|
|
299
|
+
|
|
300
|
+
```javascript
|
|
301
|
+
enumerateIndexesUsingBlock(block: (idx: number, stop: any) => void): void
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
**Parameters:**
|
|
305
|
+
|
|
306
|
+
| Name | Type | Description |
|
|
307
|
+
| :--- | :--- | :--- |
|
|
308
|
+
| `block` | `(idx, stop) => void` | 每索引调用的回调。 |
|
|
309
|
+
|
|
310
|
+
**Return Value:**
|
|
311
|
+
|
|
312
|
+
- 无。
|
|
313
|
+
|
|
314
|
+
### `enumerateIndexesWithOptionsUsingBlock`
|
|
315
|
+
|
|
316
|
+
带选项的索引遍历。
|
|
317
|
+
|
|
318
|
+
```javascript
|
|
319
|
+
enumerateIndexesWithOptionsUsingBlock(opts: number, block: (idx: number, stop: any) => void): void
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
**Parameters:**
|
|
323
|
+
|
|
324
|
+
| Name | Type | Description |
|
|
325
|
+
| :--- | :--- | :--- |
|
|
326
|
+
| `opts` | `number` | 枚举选项。 |
|
|
327
|
+
| `block` | `(idx, stop) => void` | 回调。 |
|
|
328
|
+
|
|
329
|
+
**Return Value:**
|
|
330
|
+
|
|
331
|
+
- 无。
|
|
332
|
+
|
|
333
|
+
### `enumerateIndexesInRangeOptionsUsingBlock`
|
|
334
|
+
|
|
335
|
+
在范围内按选项遍历索引。
|
|
336
|
+
|
|
337
|
+
```javascript
|
|
338
|
+
enumerateIndexesInRangeOptionsUsingBlock(range: any, opts: number, block: (idx: number, stop: any) => void): void
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
**Parameters:**
|
|
342
|
+
|
|
343
|
+
| Name | Type | Description |
|
|
344
|
+
| :--- | :--- | :--- |
|
|
345
|
+
| `range` | `any` | 范围。 |
|
|
346
|
+
| `opts` | `number` | 枚举选项。 |
|
|
347
|
+
| `block` | `(idx, stop) => void` | 回调。 |
|
|
348
|
+
|
|
349
|
+
**Return Value:**
|
|
350
|
+
|
|
351
|
+
- 无。
|
|
352
|
+
|
|
353
|
+
### `enumerateRangesUsingBlock`
|
|
354
|
+
|
|
355
|
+
用 block 遍历每个连续范围。
|
|
356
|
+
|
|
357
|
+
```javascript
|
|
358
|
+
enumerateRangesUsingBlock(block: (range: any, stop: any) => void): void
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
**Parameters:**
|
|
362
|
+
|
|
363
|
+
| Name | Type | Description |
|
|
364
|
+
| :--- | :--- | :--- |
|
|
365
|
+
| `block` | `(range, stop) => void` | 每范围调用的回调。 |
|
|
366
|
+
|
|
367
|
+
**Return Value:**
|
|
368
|
+
|
|
369
|
+
- 无。
|
|
370
|
+
|
|
371
|
+
### `enumerateRangesWithOptionsUsingBlock`
|
|
372
|
+
|
|
373
|
+
带选项的范围遍历。
|
|
374
|
+
|
|
375
|
+
```javascript
|
|
376
|
+
enumerateRangesWithOptionsUsingBlock(opts: number, block: (range: any, stop: any) => void): void
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
**Parameters:**
|
|
380
|
+
|
|
381
|
+
| Name | Type | Description |
|
|
382
|
+
| :--- | :--- | :--- |
|
|
383
|
+
| `opts` | `number` | 枚举选项。 |
|
|
384
|
+
| `block` | `(range, stop) => void` | 回调。 |
|
|
385
|
+
|
|
386
|
+
**Return Value:**
|
|
387
|
+
|
|
388
|
+
- 无。
|
|
389
|
+
|
|
390
|
+
### `enumerateRangesInRangeOptionsUsingBlock`
|
|
391
|
+
|
|
392
|
+
在指定范围内按选项遍历范围。
|
|
393
|
+
|
|
394
|
+
```javascript
|
|
395
|
+
enumerateRangesInRangeOptionsUsingBlock(range: any, opts: number, block: (range: any, stop: any) => void): void
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
**Parameters:**
|
|
399
|
+
|
|
400
|
+
| Name | Type | Description |
|
|
401
|
+
| :--- | :--- | :--- |
|
|
402
|
+
| `range` | `any` | 限定范围。 |
|
|
403
|
+
| `opts` | `number` | 枚举选项。 |
|
|
404
|
+
| `block` | `(range, stop) => void` | 回调。 |
|
|
405
|
+
|
|
406
|
+
**Return Value:**
|
|
407
|
+
|
|
408
|
+
- 无。
|
|
409
|
+
|
|
410
|
+
### `indexPassingTest`
|
|
411
|
+
|
|
412
|
+
第一个通过测试的索引。
|
|
413
|
+
|
|
414
|
+
```javascript
|
|
415
|
+
indexPassingTest(predicate: (idx: number, stop: any) => boolean): number
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**Parameters:**
|
|
419
|
+
|
|
420
|
+
| Name | Type | Description |
|
|
421
|
+
| :--- | :--- | :--- |
|
|
422
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
423
|
+
|
|
424
|
+
**Return Value:**
|
|
425
|
+
|
|
426
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
427
|
+
|
|
428
|
+
### `indexWithOptionsPassingTest`
|
|
429
|
+
|
|
430
|
+
带选项的第一个通过测试的索引。
|
|
431
|
+
|
|
432
|
+
```javascript
|
|
433
|
+
indexWithOptionsPassingTest(opts: number, predicate: (idx: number, stop: any) => boolean): number
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
**Parameters:**
|
|
437
|
+
|
|
438
|
+
| Name | Type | Description |
|
|
439
|
+
| :--- | :--- | :--- |
|
|
440
|
+
| `opts` | `number` | 枚举选项。 |
|
|
441
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
442
|
+
|
|
443
|
+
**Return Value:**
|
|
444
|
+
|
|
445
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
446
|
+
|
|
447
|
+
### `indexInRangeOptionsPassingTest`
|
|
448
|
+
|
|
449
|
+
在范围内按选项查找第一个通过测试的索引。
|
|
450
|
+
|
|
451
|
+
```javascript
|
|
452
|
+
indexInRangeOptionsPassingTest(range: any, opts: number, predicate: (idx: number, stop: any) => boolean): number
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
**Parameters:**
|
|
456
|
+
|
|
457
|
+
| Name | Type | Description |
|
|
458
|
+
| :--- | :--- | :--- |
|
|
459
|
+
| `range` | `any` | 范围。 |
|
|
460
|
+
| `opts` | `number` | 枚举选项。 |
|
|
461
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
462
|
+
|
|
463
|
+
**Return Value:**
|
|
464
|
+
|
|
465
|
+
- `number`: 索引,无则为 NSNotFound。
|
|
466
|
+
|
|
467
|
+
### `indexesPassingTest`
|
|
468
|
+
|
|
469
|
+
通过测试的索引组成的新索引集。
|
|
470
|
+
|
|
471
|
+
```javascript
|
|
472
|
+
indexesPassingTest(predicate: (idx: number, stop: any) => boolean): NSIndexSet
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
**Parameters:**
|
|
476
|
+
|
|
477
|
+
| Name | Type | Description |
|
|
478
|
+
| :--- | :--- | :--- |
|
|
479
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
480
|
+
|
|
481
|
+
**Return Value:**
|
|
482
|
+
|
|
483
|
+
- `NSIndexSet`: 新索引集。
|
|
484
|
+
|
|
485
|
+
### `indexesWithOptionsPassingTest`
|
|
486
|
+
|
|
487
|
+
带选项的筛选索引集。
|
|
488
|
+
|
|
489
|
+
```javascript
|
|
490
|
+
indexesWithOptionsPassingTest(opts: number, predicate: (idx: number, stop: any) => boolean): NSIndexSet
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
**Parameters:**
|
|
494
|
+
|
|
495
|
+
| Name | Type | Description |
|
|
496
|
+
| :--- | :--- | :--- |
|
|
497
|
+
| `opts` | `number` | 枚举选项。 |
|
|
498
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
499
|
+
|
|
500
|
+
**Return Value:**
|
|
501
|
+
|
|
502
|
+
- `NSIndexSet`: 新索引集。
|
|
503
|
+
|
|
504
|
+
### `indexesInRangeOptionsPassingTest`
|
|
505
|
+
|
|
506
|
+
在范围内按选项筛选索引集。
|
|
507
|
+
|
|
508
|
+
```javascript
|
|
509
|
+
indexesInRangeOptionsPassingTest(range: any, opts: number, predicate: (idx: number, stop: any) => boolean): NSIndexSet
|
|
510
|
+
```
|
|
511
|
+
|
|
512
|
+
**Parameters:**
|
|
513
|
+
|
|
514
|
+
| Name | Type | Description |
|
|
515
|
+
| :--- | :--- | :--- |
|
|
516
|
+
| `range` | `any` | 范围。 |
|
|
517
|
+
| `opts` | `number` | 枚举选项。 |
|
|
518
|
+
| `predicate` | `(idx, stop) => boolean` | 测试函数。 |
|
|
519
|
+
|
|
520
|
+
**Return Value:**
|
|
521
|
+
|
|
522
|
+
- `NSIndexSet`: 新索引集。
|
|
523
|
+
|
|
524
|
+
## 相关
|
|
525
|
+
|
|
526
|
+
- `NSMutableIndexSet` — 可变索引集
|
|
527
|
+
- [NSArray](/reference/foundation/ns-array/)(`objectsAtIndexes` 等)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: NSJSONSerialization
|
|
3
|
+
description: JSON 与 Foundation 对象之间的序列化与反序列化。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
用于在 JSON 数据(NSData)与 JavaScript 对象/数组之间转换。
|
|
7
|
+
|
|
8
|
+
## 实例成员 (Instance members)
|
|
9
|
+
|
|
10
|
+
当前运行时未额外暴露 `NSJSONSerialization` 的实例成员;通常直接使用其类成员完成序列化/反序列化。
|
|
11
|
+
|
|
12
|
+
## 类成员 (Class members)
|
|
13
|
+
|
|
14
|
+
| 方法 | 参数 | 返回值 | 说明 |
|
|
15
|
+
|------|------|--------|------|
|
|
16
|
+
| `isValidJSONObject(obj)` | obj: any | boolean | 检查对象是否可被序列化为 JSON。 |
|
|
17
|
+
| `dataWithJSONObjectOptions(obj, options)` | obj, options: number | NSData | 将对象/数组序列化为 NSData。 |
|
|
18
|
+
| `JSONObjectWithDataOptions(data, options)` | data: NSData, options: number | any | 将 NSData 解析为对象/数组。 |
|
|
19
|
+
|
|
20
|
+
options 通常传 0。最新导出接口不包含 error 参数;若解析/序列化失败,通常以返回值/异常表现为准(建议在控制台打印并做兼容处理)。
|
|
21
|
+
|
|
22
|
+
## 相关
|
|
23
|
+
|
|
24
|
+
- [NSData](/reference/foundation/ns-data/)
|