ios - "Ambiguous Reference To" Error in Swift 3 -


good afternoon,

im attempting code music play application in trying implement open source code entitled "stk audio player" coded in objective c.

when attempting call method imported source, receive following compile error.

"ambiguous reference member play"

import uikit  class viewcontroller: uiviewcontroller {  var audioplayer = stkaudioplayer()   override func viewdidload() {     super.viewdidload()     // additional setup after loading view, typically nib.      let songtoplay:string = "http://themarketshop.com/beats/fatbeat.mp3"      stkaudioplayer.play(songtoplay) }  override func didreceivememorywarning() {     super.didreceivememorywarning()     // dispose of resources can recreated. } 

}

from open source

/// plays item given url string (all pending queued items removed). /// nsstring used queue item id -(void) play:(nsstring*)urlstring; 

play instance (-) method, use instance:

audioplayer.play(songtoplay) 

and not annotate literal strings string. including compiler can see is.


Comments

Popular posts from this blog

serialization - Convert Any type in scala to Array[Byte] and back -

matplotlib support failed in PyCharm on OSX -

python - Matplotlib: TypeError: 'AxesSubplot' object is not callable -