defer swift – what is defer in swift ?
It’s similar to the finally{} black used in C++ and Java. That means the code in defer will run anyways no matter what.
1 2 3 4 5 6 7 8 |
try{ } catch{ // more than one catch can be } defer{ // code you want to run } |