Explain ButtonStyle protocol in Swift. Tell one difference between an array and a set.
Utilisateur anonyme
ButtonStyle protocol allow to customize new button styles that can be reused without the need for new views. Using this protocol, you can create a button that will appear the way you want. You will make your own style that sets a decent background for a button. You can use the buttonStyle(_:) modifier. Where arrays are an ordered collection of values, sets are an unordered collection. Also, an array can duplicate elements,