Commit a281de05 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Chromium LUCI CQ

[iOS][Thumb Strip] Remove retain cycle

Removes the following retain cycle:
self-> animator-> animations block -> self

Bug: N/A
Change-Id: I614f6d81f328eed8e0707f87fa2a9065d00089ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2617863
Auto-Submit: Javier Flores <javierrobles@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarRobbie Gibson <rkgibson@google.com>
Cr-Commit-Position: refs/heads/master@{#841985}
parent 5338df44
...@@ -167,13 +167,14 @@ const CGFloat kAnimationDuration = 0.25f; ...@@ -167,13 +167,14 @@ const CGFloat kAnimationDuration = 0.25f;
} }
[self willAnimateViewReveal]; [self willAnimateViewReveal];
[self.animator stopAnimation:YES]; [self.animator stopAnimation:YES];
__weak ViewRevealingVerticalPanHandler* weakSelf = self;
self.animator = [[UIViewPropertyAnimator alloc] self.animator = [[UIViewPropertyAnimator alloc]
initWithDuration:kAnimationDuration initWithDuration:kAnimationDuration
dampingRatio:1 dampingRatio:1
animations:^() { animations:^() {
[self animateToNextViewRevealState]; [weakSelf animateToNextViewRevealState];
}]; }];
__weak ViewRevealingVerticalPanHandler* weakSelf = self;
[self.animator addCompletion:^(UIViewAnimatingPosition finalPosition) { [self.animator addCompletion:^(UIViewAnimatingPosition finalPosition) {
if (!weakSelf.animator.reversed) { if (!weakSelf.animator.reversed) {
weakSelf.currentState = weakSelf.nextState; weakSelf.currentState = weakSelf.nextState;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment