Michal Klimczak
04/27/2021, 5:26 PM...Protocol
and ...ProtocolMeta
Let's say I have some code that looks like this:
val player = AVAudioPlayer(soundUrl, null)
player.delegate = object : AVAudioPlayerDelegateProtocol{
override fun audioPlayerDidFinishPlaying(
player: AVAudioPlayer,
successfully: Boolean
) {
...
}
}
It complains that it needs to override all these ios NSObjectProtocol methods which is probably not something that I want. But when I try to use AVAudioPlayerDelegateProtocol*Meta*
player.delegate complains that it doesn not conform to AVAudioPlayerDelegateProtocol
Can I make the delegate work without implementing all these weird NSObjectProtocol methods.?Michal Klimczak
04/27/2021, 6:24 PMplayer.delegate = object : NSObject(), AVAudioPlayerDelegateProtocol {