Is Multiple inheritance not allowed in Swift?

So am watching a Speech To Text demo on YouTube, here:

https://www.youtube.com/watch?v=SZJ8zjMGUcY

There are no files, so am typing from the screen, and immediately run into an error that confuses me.

at

class ViewController : UIViewController, SFSpeechRecognizer {

here's a screenshot:

Swift gives me an error indicating that Multiple Inheritance is not allowed.

The programmer doesn't have files to download, and I like to start from scratch anyway, typing and copying so I am forced to read each line.

Is there something I have to change in the project itself that allows Multiple Inheritances?

This video is from last year, and is on Swift 5.0. So I don't think there could be that much of a major change in Swift in that time.

Thanks

Answered by SergioDCQ in 693798022

Doh! Thanks. Am going to blame the laziness of autocomplete. That’s why I like to type everything. Ingrains it better.

Multiple Inheritances is not allowed in swift SFSpeechRecognizer is a class; thus the error

The YouTube video is using sfspeechrecognizerdelegate not SFSpeechRecognizer

sfspeechrecognizerdelegate is protocol

Accepted Answer

Doh! Thanks. Am going to blame the laziness of autocomplete. That’s why I like to type everything. Ingrains it better.

Is Multiple inheritance not allowed in Swift?
 
 
Q