weak
and unowned
?Suggested approach: As well as explaining that weak
becomes a regular optional whereas unowned
is an implicitly unwrapped optional, be prepared to discuss the safety differences. Do you have a preference? If so, why? Can you think of places where unowned
must be used?
Estimated difficulty: Intermediate
Watch me answer this question in detail
See the full list of iOS interview questions
Link copied to your pasteboard.