(... as? ...)?.method()
Swift ⟩ Pattern Matching ⟩ Sentence Patterns ⟩
💾 程式: Mirror.handleChildren()
// ⭐ `(... as? ...)?.method()` (optional chaining)
for child in mirror.children {
(child.value as? Resettable)?.reset()
}
Last updated
Was this helpful?