1

Two sections are being generated. CarPlay automatically generates them using the data we provide from the MPPlayableContentDataSource. How can I detect when a user taps on a tab?

MendyK
  • 1,643
  • 1
  • 17
  • 30

2 Answers2

0

There is an API called beginLoadingChildItemsAtIndexPath in MPPlayableContentDataSource. You can use indexPath.length and [indexPath indexAtPosition:] to make sure which item is taped ( include tab-item )

zachke
  • 1
0

In short: You can't. You can use the methods called on MPlayableContentDataSource (first time the tab is visible the items for that tab will be queried) and MPPlayableContentDelegate (when the user taps on an item, it's clear which tab the index path belongs to) to reason about the currently visible tab, but there is no public method that is called upon switching tabs.

DrMickeyLauer
  • 4,455
  • 3
  • 31
  • 67