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

Popular posts from this blog

php - Using grpc in Laravel, "Class 'Grpc\ChannelCredentials' not found." -

github - Git errors while pushing -

java - Generating a pre-signed PUT url for Amazon S3 with a maximum content-length -