Commit 47e83d48 authored by Stepan Khapugin's avatar Stepan Khapugin Committed by Chromium LUCI CQ

[iOS][Getaway] Add dismissal fade animation.

Adds a fading alpha animation when dismissing the blocking UI.

Bug: none
Change-Id: I014b8e67d230045e130343894cb4759ce05b8ac5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2593633
Auto-Submit: Stepan Khapugin <stkhapugin@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#837553}
parent 9a6a5a21
...@@ -4712,8 +4712,15 @@ NSString* const kBrowserViewControllerSnackbarCategory = ...@@ -4712,8 +4712,15 @@ NSString* const kBrowserViewControllerSnackbarCategory =
[self.view addSubview:self.blockingView]; [self.view addSubview:self.blockingView];
AddSameConstraints(self.view, self.blockingView); AddSameConstraints(self.view, self.blockingView);
self.blockingView.alpha = 1;
} else { } else {
[self.blockingView removeFromSuperview]; [UIView animateWithDuration:0.2
animations:^{
self.blockingView.alpha = 0;
}
completion:^(BOOL finished) {
[self.blockingView removeFromSuperview];
}];
} }
} }
......
...@@ -563,9 +563,16 @@ NSIndexPath* CreateIndexPath(NSInteger index) { ...@@ -563,9 +563,16 @@ NSIndexPath* CreateIndexPath(NSInteger index) {
} }
[self.view addSubview:self.blockingView]; [self.view addSubview:self.blockingView];
self.blockingView.alpha = 1;
AddSameConstraints(self.collectionView.frameLayoutGuide, self.blockingView); AddSameConstraints(self.collectionView.frameLayoutGuide, self.blockingView);
} else { } else {
[self.blockingView removeFromSuperview]; [UIView animateWithDuration:0.2
animations:^{
self.blockingView.alpha = 0;
}
completion:^(BOOL finished) {
[self.blockingView removeFromSuperview];
}];
} }
} }
......
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