ios - Is it necessary to use [unowned self] in closures of UIView.animateWithDuration(...)? -
uiview.animatewithduration(1, animations: { [unowned self] in self.box.center = self.boxtoprightposition }, completion: { [unowned self] completed in self.box.hidden = true })
is necessary avoid memory leak?
no, not needed in case. animations
, completion
not retained self
there no risk of strong retain cycle.
Comments
Post a Comment