Contents

beginLoadingChildItems(at:completionHandler:)

Starts to load the children of the indicated index.

Declaration

optional func beginLoadingChildItems(at indexPath: IndexPath, completionHandler: @escaping  @Sendable ((any Error)?) -> Void)
optional func beginLoadingChildItems(at indexPath: IndexPath) async throws

Parameters

  • indexPath:

    The index of the current item.

  • completionHandler:

    A block to be called after all loading is completed.

    The block receives the following parameter:

    error

    Contains an error message if there was an error trying to load the children of the indicated item; otherwise, contains nil.

Discussion

Call this method to start asynchronous batch loading of media items. The app can load content before the media player needs to display the next media items. When you use this method, the client app must call the completion handler after loading has finished.

See Also

Working with child nodes