Suggested approach: Swift’s
catch blocks let us catch several types of errors, specified using comma separation – hence the “multi-pattern” clauses. They are useful as a way of grouping error handling code together: if the error thrown was A or B then take the same action, but if it was C or D take some other action.
Estimated difficulty: Intermediate
See the full list of iOS interview questions
finalkeyword do, and why would you want to use it?
Link copied to your pasteboard.