Use the delegate in controller
This commit is contained in:
parent
c3b5a1b4cf
commit
9fefa996f2
@ -8,7 +8,8 @@
|
||||
|
||||
#import <AVKit/AVKit.h>
|
||||
#import "RCTVideo.h"
|
||||
#import "RCTVideoPlayerViewControllerDelegate.h"
|
||||
|
||||
@interface RCTVideoPlayerViewController : AVPlayerViewController
|
||||
@property (nonatomic, weak) id<RCTVideo> rctVideoView;
|
||||
@property (nonatomic, weak) id<RCTVideoPlayerViewControllerDelegate *> rctDelegate;
|
||||
@end
|
||||
|
@ -14,9 +14,15 @@
|
||||
|
||||
@implementation RCTVideoPlayerViewController
|
||||
|
||||
- (IBAction)close:(id)sender
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
{
|
||||
[self.rctVideoView setFullscreen:false];
|
||||
[super viewDidDisappear:animated];
|
||||
[_rctDelegate videoPlayerViewControllerDidDismiss:self];
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[_rctDelegate videoPlayerViewControllerWillDismiss:self];
|
||||
[super viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
Reference in New Issue
Block a user