VLCPlaybackInfoTracksTVViewController reports incorrect preferredContentSize
When VLCPlaybackInfoChaptersTVViewController#shouldBeVisibleForPlaybackController
returns false
, its parent assumes VLCPlaybackInfoTracksTVViewController
to be the first controller to be shown, but it reports an invalid preferredContentSize
of 20
.
During debug, I noticed both audioTrackCollectionView
and subtitleTrackCollectionView
were reporting their contentSize.height
to be zero, even though reloadData
is called for both of them by viewWillAppear
.
I was able to mitigate the problem by also calling invalidateLayout
, and prepareLayout
on each of the aforementioned collection view's collectionViewLayout
, and finally calling layoutIfNeeded
on the view's themselves.
Although it worked, I'm not sure whether this is the right course of action to address this, given I've already tried any common means to force those views to report their content size when preferredContentSize
is called.
Suggestions anyone?
It may important to notice that VLCPlaybackInfoChaptersTVViewController
uses basically the same methods as ChaptersTVViewController
, but I didn't try to reproduce the issue with a video file with chapters. Will try to do it asap.