How to include optional type in Any type avoiding warning in Swift?

We can include optional type value as Any type value in Swift. If directly add optional type to Any type, warning will be shown. In order to avoid this warning, cast the optional type as Any type while adding it to the Any type.

Leave a Reply

%d bloggers like this: