Search code examples
avplayerview

Custom AVPlayerVIew: do you know which initializer is used by default?


The standard NSView initializer initWithFrame:(NSRect)frame; is not getting called in my custom view. I've tried simple init, but so far, nothing is called. Also, the drawRect: method is not called. So how is one to intercept the initialization of the AVPlayerView?


Solution

  • I found the answer to this (using Objective-C) - it is:

    • (instancetype) initWithCoder:(NSCoder *)coder;