Adding Section Headers | raywenderlich.com


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5429927-beginning-collection-views/lessons/25

@pasanpr, could you please explain what you do on 9:50: if let self = self, [weak self], etc… =)

Hey, @andreysvx if you still need help with this, checkout this blog for more details on capture lists.

In short, what @pasanpr is doing is passing a weak reference of self to the closure in order to avoid retain cycles.

1 Like

@samyanez94 thank you a lot!