In Objective-C in non-trivial blocks I noticed usage of weakSelf/strongSelf.
What is the correct way of usage strongSelf in Swift? Something like:
if let strongSelf = self {
strongSelf.doSomething()
}
So for each line containing self in closure I should add strongSelf check?
if let strongSelf = self {
strongSelf.doSomething1()
}
if let strongSelf = self {
strongSelf.doSomething2()
}
Is there any way to make aforesaid more elegant?