One of the big changes from Objective-C to Swift is that you can define methods in enums and structs. How can I effectively use that to my advantage. I want to know when can I use this to my advantage with respects to creating an efficient data structure and writing cleaner code.
Asked
Active
Viewed 33 times
1 Answers
1
Structs in swift are quite similar to classes, the only difference really is that when structs are passed as parameters or assigned to variables, they are copied instead of referenced. see this answer and this answer for more detail
otherwise, you should first check out the documentation