Platforms to show: All Mac Windows Linux Cross-Platform

Back to PHFetchResultMBS class.

PHFetchResultMBS.allObjects as Variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Queries all objects as array.

PHFetchResultMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The constructor.

PHFetchResultMBS.containsObject(anObject as Variant) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns whether the specified object is present in the fetch result.

anObject: An object.

Returns true if anObject is present in the fetch result, otherwise false.

This method determines whether anObject is present in the fetch result by sending an isEqual: message to each of the fetch result’s objects (and passing anObject as the parameter to each isEqual message).

PHFetchResultMBS.copy as PHFetchResultMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a copy of the result set.

PHFetchResultMBS.countOfAssetsWithMediaType(MediaType as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the number of assets in the fetch result of a specified type.

mediaType: The type of assets to count, such as image or video. See MediaType constants.

Returns the number of assets in the fetch result of the specified type.

The first time you call this method, Photos enumerates the contents of the fetch result to count those of the specified type, then caches the result. Subsequent calls with the same mediaType parameter return the cached value.
This method counts only the PHAssetMBS objects in a fetch result. If a fetch result contains only PHAssetCollectionMBS or PHCollectionListMBS objects, the return value is 0.

PHFetchResultMBS.indexOfObject(anObject as Variant) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the lowest index whose corresponding object in the fetch result is equal to the specified object.

anObject: An object.

Returns the lowest index whose corresponding object in the fetch result is equal to anObject, or NSNotFound if no such object is in the fetch result.

Starting at index 0, this method sends an isEqual message to each object in the fetch result until it finds a match or reaches the end of the fetch result. This method passes the anObject parameter to each isEqual message.

See also:

PHFetchResultMBS.indexOfObject(anObject as Variant, range as NSRangeMBS) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the lowest index within the specified range whose corresponding object in the fetch result is equal to the specified object.

anObject: An object.
range: The range of indexes in the fetch result within which to search for anObject.

Returns the lowest index within range whose corresponding object in the fetch result is equal to anObject, or NSNotFound if no such object is in the fetch result.

Starting at range.location, this method sends an isEqual message to each object in the fetch result until it finds a match or reaches the end of the fetch result. This method passes the anObject parameter to each isEqual message.
Raises an exception (NSExceptionMBS class) if the range parameter represents a range that doesn’t exist in the fetch result.

See also:

PHFetchResultMBS.objectAtIndex(index as Integer) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns the object located at the specified index.

index: An index within the bounds of the fetch result.

Returns the object located at index in the fetch result.

Raises an exception (NSExceptionMBS class) if index is beyond the end of the fetch result (that is, greater than or equal to the value of the count property).

PHFetchResultMBS.objectsAtIndexes(indexes as NSIndexSetMBS) as Variant()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Photos MBS Mac64bit Plugin 20.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns an array containing the objects in the fetch result at the indexes in the specified index set.

indexes: An index set containing indexes within the bounds of the fetch result.

Returns an array containing the objects in the fetch result at the indexes specified by indexes.

The ordering of the returned array follows the index set. That is, in the returned array, an object with a higher index in the index set comes after any object with a smaller index in the index set.
Raises an exception (NSExceptionMBS) if any index in the index set is beyond the end of the fetch result (that is, greater than or equal to the value of the count property).

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...