What is SwiftUI protocol?

A protocol defines a blueprint of methods, properties, and other requirements that suit a particular task or piece of functionality . The protocol can then be adopted by a class, structure, or enumeration to provide an actual implementation of those requirements.

Read more

Should I use optional chaining?

You can use optional chaining when attempting to call a method which may not exist . This can be helpful, for example, when using an API in which a method might be unavailable, either due to the age of the implementation or because of a feature which isn’t available on the user’s device.

Read more