Instance Method

performFetch()

Executes the fetch request.

Declaration

func performFetch() throws

Parameters

error

If the fetch is not successful, upon return contains an error object that describes the problem.

Return Value

true if the fetch executed successfully, otherwise false.

Discussion

After executing this method, you can access the receiver’s the fetched objects with the property fetchedObjects.

Special Considerations

This method returns false (and a suitable error in error) if the fetch request doesn’t include a sort descriptor that uses the section name key path specified in init(fetchRequest:managedObjectContext:sectionNameKeyPath:cacheName:).

See Also

Initializing a Fetched Results Controller