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

Unified Diff: remoting/ios/app/host_setup_footer_view.mm

Issue 2957943002: [CRD iOS] Add the host setup instruction page (Closed)
Patch Set: Resolve Feedback Created 3 years, 6 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 | « remoting/ios/app/host_setup_footer_view.h ('k') | remoting/ios/app/host_setup_header_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/ios/app/host_setup_footer_view.mm
diff --git a/remoting/ios/app/host_setup_footer_view.mm b/remoting/ios/app/host_setup_footer_view.mm
new file mode 100644
index 0000000000000000000000000000000000000000..f271133161d29e21ca0b5cd74bb99aaba0aac2a9
--- /dev/null
+++ b/remoting/ios/app/host_setup_footer_view.mm
@@ -0,0 +1,53 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+#import "remoting/ios/app/host_setup_footer_view.h"
+
+#import "ios/third_party/material_components_ios/src/components/Buttons/src/MaterialButtons.h"
+#import "ios/third_party/material_components_ios/src/components/Typography/src/MaterialTypography.h"
+#import "remoting/ios/app/app_delegate.h"
+#import "remoting/ios/app/remoting_theme.h"
+
+static const CGFloat kTopPadding = 6.f;
+
+@implementation HostSetupFooterView
+
+- (instancetype)initWithFrame:(CGRect)frame {
+ if (self = [super initWithFrame:frame]) {
+ [self commonInit];
+ }
+ return self;
+}
+
+- (void)commonInit {
+ self.backgroundColor = RemotingTheme.setupListBackgroundColor;
+
+ MDCRaisedButton* raisedButton = [[MDCRaisedButton alloc] init];
+
+ [raisedButton setTitle:@"Email link and instructions"
+ forState:UIControlStateNormal];
+ [raisedButton setTitleColor:RemotingTheme.buttonTextColor
+ forState:UIControlStateNormal];
+ [raisedButton sizeToFit];
+ [raisedButton addTarget:self
+ action:@selector(didTapEmailInstructions:)
+ forControlEvents:UIControlEventTouchUpInside];
+ [self addSubview:raisedButton];
+ raisedButton.translatesAutoresizingMaskIntoConstraints = NO;
+ [NSLayoutConstraint activateConstraints:@[
+ [raisedButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
+ [raisedButton.topAnchor constraintEqualToAnchor:self.topAnchor
+ constant:kTopPadding],
+ ]];
+}
+
+- (void)didTapEmailInstructions:(id)button {
+ [AppDelegate.instance emailSetupInstructions];
+}
+
+@end
« no previous file with comments | « remoting/ios/app/host_setup_footer_view.h ('k') | remoting/ios/app/host_setup_header_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698