Gorgeous Swift nested-class-in-closure-literal approach to delegates:
gist.github.com/austinzheng/8f
Nice, . (but why the [self]?)
Conversation
I wondered the same thing re self.
Pardon the ignorance tho, but I fail to see the benefit of this.
1
It runs just fine without the [self], I'd say chalk it up to 'not yet refactored before code review'
1
[self] keeps a strong reference to self during the closure (opposite of [unowned self])
1
1
far from intuitive though. I wonder if anyone has filed a radar on making that more explicit
2
1
not needed in this case, but I think kept it since it would be common usage with this pattern
1



