?. What does it mean?

Hi,

I am a beginner. Some times I see "?." in the code. What does it mean? For example:

speechRecognizer?.delegate = self

Thanks

Thats optional chaining, read more here:
https://docs.swift.org/swift-book/LanguageGuide/OptionalChaining.html

1 Like

Thanks a lot! This is very useful!

1 Like
Terms of Service

Privacy Policy

Cookie Policy