0

I have implemented MPPlayableContentDataSource protocol. It has a method

- (void)beginLoadingChildItemsAtIndexPath:(NSIndexPath *)indexPath completionHandler:(void(^)(NSError * __nullable))completionHandler;

head unit calls this method each time when some container was shown on screen or user was tapped on some container.

How can I recognize who initialize call of the method? (user by tap or head unit)

Vit
  • 936
  • 1
  • 10
  • 20

1 Answers1

0

First off, why would the difference (if there was any) matter? If that delegate method is being called, then you need to load the child items – period. That said, the head unit never requests your items without a user interaction of some kind.

When the user taps on a container, the child items for that index path are requested. Depending on whether you have a synchronous or asynchronous interface, you can then implement the respective delegate methods.

DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67
  • it was important for the analytic system(we wanted to know which content was opened by user) – Vit Sep 23 '19 at 16:06