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

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -