Selaa lähdekoodia

Layout the subframe so that it's shown on first visit

On tvOS, there's a bug where the list of chapters isn't shown when the
info pane is first opened. Switching to another tab of the pane and then
back to the (default, first) Chapters tab displays the subview correctly.
Calling layoutIfNeeded when binding the subview to the info controller
seems to ensure that it's ready to be displayed on the first visit.
Richard Soderberg 6 vuotta sitten
vanhempi
commit
6bb63a1f11
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Apple-TV/Playback/Playback Info/VLCPlaybackInfoTVAnimators.m

+ 1 - 0
Apple-TV/Playback/Playback Info/VLCPlaybackInfoTVAnimators.m

@@ -98,6 +98,7 @@
         toFrame = smallFrame;
         fromFrame = largeFrame;
         [container addSubview:target.view];
+        [target.view layoutIfNeeded];
     } else if ([source isKindOfClass:[VLCPlaybackInfoTVViewController class]]) {
         infoVC = (VLCPlaybackInfoTVViewController*) source;
         infoVC.dimmingView.alpha = 1.0;