From 75bba402fb2776b5e249bd7c61f35d725944eb5c Mon Sep 17 00:00:00 2001 From: Vadim Kuznetsov Date: Thu, 21 Mar 2024 12:23:46 +0300 Subject: [PATCH] fix: UI issue with top margin on content page (#341) [iOS] UI issue with top margin on content page on iPad #335 --- .../Presentation/Video/EncodedVideoPlayer.swift | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Course/Course/Presentation/Video/EncodedVideoPlayer.swift b/Course/Course/Presentation/Video/EncodedVideoPlayer.swift index 485eb5c17..d13af950e 100644 --- a/Course/Course/Presentation/Video/EncodedVideoPlayer.swift +++ b/Course/Course/Presentation/Video/EncodedVideoPlayer.swift @@ -77,7 +77,6 @@ public struct EncodedVideoPlayer: View { }, seconds: { seconds in currentTime = seconds }) - .statusBarHidden(false) .aspectRatio(16 / 9, contentMode: .fit) .frame(minWidth: isHorizontal ? reader.size.width * 0.6 : 380) .cornerRadius(12) @@ -125,10 +124,14 @@ public struct EncodedVideoPlayer: View { } } } - }.padding(.horizontal, isHorizontal ? 0 : 8) - .onDisappear { - viewModel.controller.player?.allowsExternalPlayback = false - } + } + .padding(.horizontal, isHorizontal ? 0 : 8) + .onDisappear { + viewModel.controller.player?.allowsExternalPlayback = false + } + .onAppear { + viewModel.controller.setNeedsStatusBarAppearanceUpdate() + } } private func pauseScrolling() {