AceMobileInterview

iOS track

General topic questions

Structs vs Classes

EasyCommon

Free section · general topics & algorithms

When do you choose a struct over a class in Swift?

Reveal model answer
Prefer structs for value semantics, thread-safer copies, and simple data. Use classes for identity, inheritance, Objective-C interop, or shared mutable references. Many modern models are structs; UIKit types remain classes.
Value vs Reference TypesApp Transport Security