From e0c2228ac6d77e66a91891e004c673f48c5f124f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hans=20Kn=C3=B6chel?= Date: Wed, 28 Jun 2023 13:55:25 +0200 Subject: [PATCH] fix(ios): properly attach / detach child video controller --- iphone/Classes/TiMediaVideoPlayerProxy.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/iphone/Classes/TiMediaVideoPlayerProxy.m b/iphone/Classes/TiMediaVideoPlayerProxy.m index 8030b016101..d8d2880ac81 100644 --- a/iphone/Classes/TiMediaVideoPlayerProxy.m +++ b/iphone/Classes/TiMediaVideoPlayerProxy.m @@ -166,6 +166,11 @@ - (void)viewWillAttach reallyAttached = YES; } +- (void)viewDidAttach +{ + [TiApp.controller.topPresentedController addChildViewController:movie]; +} + - (void)viewDidDetach { [self removeNotificationObserver]; @@ -175,6 +180,7 @@ - (void)viewDidDetach [movie setPlayer:nil]; RELEASE_TO_NIL(movie); reallyAttached = NO; + [movie removeFromParentViewController]; } - (void)windowWillClose