registeredModel(for:)
Returns the typed model for the specified identifier.
Declaration
func registeredModel<T>(for persistentModelID: PersistentIdentifier) -> T? where T : PersistentModelParameters
- persistentModelID:
The identifier of the model to fetch. For more information, see Persistentidentifier.
Return Value
A typed instance of the identified model, if known to the context; otherwise, nil.