Observing Multiple NSKeyObservingKeyValueoptions swift -
how observe multiple nskeyobservingkeyvalueoptions in swift
 self.avplayeritem.addobserver(self, forkeypath: "status", options:[.initial | .new], context: nil) i error
error
no '|' candidates produce expected contextual result type 'nskeyvalueobservingoptions'
change
 self.avplayeritem.addobserver(self, forkeypath: "status", options:[.initial | .new], context: nil) to:
 self.avplayeritem.addobserver(self, forkeypath: "status", options:[.initial, .new], context: nil) 
Comments
Post a Comment