Swift โฉ Pattern Matching โฉ Sentence Patterns โฉ
๐ ๆฏ่ผ๏ผ if let ... as?
// switch on "protocol type" switch medium { case let b as Book : // ... โญ๏ธ ๆณจๆ๏ผ้่ฃก็จ็ๆฏ `as` ไธๆฏ `as?` case let m as Movie: // ... default: // ... }
AliSoftware โฉ Pattern Matching
Part 1: switch, enums & where clauses
Part 2: tuples, ranges & types โญ๏ธ
if let ... as? - use as?.
as?
Last updated 2 years ago