Swift 5: Fallthrough Used-Cases You Must Know
Hi iOS Devs,
In general, switch
statements only execute one case. If we want to continue the execution to the next case, we can use the fallthrough
keyword. Today, I’ll talk about the most common used-cases of fallthrough
.
Case 1
Let’s say we’re developing a weather app. We need to check the authorization status. Based on what we…