In the closure you use “action in” what is the action referring to? Shouldn’t it be actionitem?
I’m always confused on when to use [weak self] in closures. I figure they are used to avoid circular strong references. What I’m not too clear on is in this video what is the strong circular reference that would be created if we did not use [weak self]? I’m assuming that:
presentViewController sets presentedViewController
and UIAlertAction with the closure sets a reference to self thus making things circular
What I don’t get is doesn’t the circular reference go away after alert is dismissed since presentedViewController becomes nil?