Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: ios/chrome/browser/ui/first_run/static_file_view_controller.mm

Issue 2781073002: Use the old back button on Terms of Service. (Closed)
Patch Set: Feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/first_run/first_run_egtest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/first_run/static_file_view_controller.mm
diff --git a/ios/chrome/browser/ui/first_run/static_file_view_controller.mm b/ios/chrome/browser/ui/first_run/static_file_view_controller.mm
index 369929a4bbb532daeb91b067f4a9bd9c693356dc..3e38bd534d6d2fa81e225cf2411d758a825e0b2e 100644
--- a/ios/chrome/browser/ui/first_run/static_file_view_controller.mm
+++ b/ios/chrome/browser/ui/first_run/static_file_view_controller.mm
@@ -8,6 +8,7 @@
#include "base/logging.h"
#include "ios/chrome/browser/browser_state/chrome_browser_state.h"
+#import "ios/chrome/browser/ui/icons/chrome_icon.h"
#import "ios/chrome/browser/ui/material_components/utils.h"
#include "ios/chrome/browser/ui/rtl_geometry.h"
#import "ios/third_party/material_components_ios/src/components/AppBar/src/MaterialAppBar.h"
@@ -30,6 +31,9 @@
MDCAppBar* _appBar;
}
+// Called when the back button is pressed.
+- (void)back;
+
@end
@implementation StaticFileViewController
@@ -73,6 +77,19 @@
// Add the app bar at the end.
[_appBar addSubviewsToParent];
+
+ // Create a custom Back bar button item, as Material Navigation Bar deprecated
+ // the back arrow with a shaft.
+ self.navigationItem.leftBarButtonItem =
+ [ChromeIcon templateBarButtonItemWithImage:[ChromeIcon backIcon]
+ target:self
+ action:@selector(back)];
+}
+
+#pragma mark - Actions
+
+- (void)back {
+ [self.navigationController popViewControllerAnimated:YES];
}
@end
« no previous file with comments | « ios/chrome/browser/ui/first_run/first_run_egtest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698