I'm making an iOS app with objective-c.
Please tell me how to fix AVPlayerView in iOS13.x environment.
ViewController.m write
AVPlayerLayer* layer = (AVPlayerLayer*)self.videoView.layer;
VideoView contains AVPlayerView
AVPlayerView.m write
#import "AVPlayerView.h"
#import <AVFoundation/AVFoundation.h>
@implementation AVPlayerView
+(Class)layerClass{
return AVPlayerLayer.class;
}
@end
The layerClass method is not called for some reason.
Also, the class returned by (AVPlayerLayer *) self.videoView.layer
AVPresentationVontainerViewLayer.
I want an AVPlayerView class.
How should i fix it?