34,333
edits
Changes
→Using self in Swift
In most cases, use of self is optional in Swift. That being said, one situation where it is still necessary to use self is when referencing a property or method from within a closure expression. The use of self, for example, is mandatory in the following closure expression:
<pre>
document?.openWithCompletionHandler({(success: Bool) -> Void in