A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mongodb.com/docs/realm-sdks/objc/latest/Classes/RLMArray.html below:

RLMArray Class Reference

RLMArray

Objective-C

@interface RLMArray<RLMObjectType> : NSObject <RLMCollection>

Swift

@_nonSendable(_assumed) class RLMArray<RLMObjectType> : NSObject, RLMCollection where RLMObjectType : AnyObject

RLMArray is the container type in Realm used to define to-many relationships.

Unlike an NSArray, RLMArrays hold a single type, specified by the objectClassName property. This is referred to in these docs as the “type” of the array.

When declaring an RLMArray property, the type must be marked as conforming to a protocol by the same name as the objects it should contain (see the RLM_COLLECTION_TYPE macro). In addition, the property can be declared using Objective-C generics for better compile-time type safety.

RLM_COLLECTION_TYPE(ObjectType)
...
@property RLMArray<ObjectType *><ObjectType> *arrayOfObjectTypes;

RLMArrays can be queried with the same predicates as RLMObject and RLMResults.

RLMArrays cannot be created directly. RLMArray properties on RLMObjects are lazily created when accessed, or can be obtained by querying a Realm.

Key-Value Observing

RLMArray supports array key-value observing on RLMArray properties on RLMObject subclasses, and the invalidated property on RLMArray instances themselves is key-value observing compliant when the RLMArray is attached to a managed RLMObject (RLMArrays on unmanaged RLMObjects will never become invalidated).

Because RLMArrays are attached to the object which they are a property of, they do not require using the mutable collection proxy objects from -mutableArrayValueForKey: or KVC-compatible mutation methods on the containing object. Instead, you can call the mutation methods on the RLMArray directly.

Accessing Objects from an Array Adding, Removing, and Replacing Objects in an Array Aggregating Property Values

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4