Changes

Jump to: navigation, search

The Basics of Object Oriented Programming in Swift

22 bytes removed, 20:18, 1 November 2016
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:
<htmlet>ios10</htmlet>
<pre>
document?.openWithCompletionHandler({(success: Bool) -> Void in

Navigation menu