Should I use struct or class swift?
Answer / Praveena Rani
Whether to use a struct or a class in Swift depends on your specific needs. Use a struct when the value type does not need to be mutable or you don't need inheritance. Use a class for more complex object-oriented programming, where inheritance and reference types are necessary.
| Is This Answer Correct ? | 0 Yes | 0 No |
what are functions different from methods?
What is nil in swift?
What are structures in swift?
How you define variables in swift language?
What is difference between class and struct swift?
What are the collection types available in swift?
What is $0 in swift?
How do you make a swift bridging header?
How can you write a multiple line comment swift?
What is mvvm in swift?
What is an in-out parameter in swift?
What is dynamic keyword in swift?