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

Side by Side 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, 5 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #if !defined(__has_feature) || !__has_feature(objc_arc)
6 #error "This file requires ARC support."
7 #endif
8
9 #import "remoting/ios/app/host_setup_footer_view.h"
10
11 #import "ios/third_party/material_components_ios/src/components/Buttons/src/Mate rialButtons.h"
12 #import "ios/third_party/material_components_ios/src/components/Typography/src/M aterialTypography.h"
13 #import "remoting/ios/app/app_delegate.h"
14 #import "remoting/ios/app/remoting_theme.h"
15
16 static const CGFloat kTopPadding = 6.f;
17
18 @implementation HostSetupFooterView
19
20 - (instancetype)initWithFrame:(CGRect)frame {
21 if (self = [super initWithFrame:frame]) {
22 [self commonInit];
23 }
24 return self;
25 }
26
27 - (void)commonInit {
28 self.backgroundColor = RemotingTheme.setupListBackgroundColor;
29
30 MDCRaisedButton* raisedButton = [[MDCRaisedButton alloc] init];
31
32 [raisedButton setTitle:@"Email link and instructions"
33 forState:UIControlStateNormal];
34 [raisedButton setTitleColor:RemotingTheme.buttonTextColor
35 forState:UIControlStateNormal];
36 [raisedButton sizeToFit];
37 [raisedButton addTarget:self
38 action:@selector(didTapEmailInstructions:)
39 forControlEvents:UIControlEventTouchUpInside];
40 [self addSubview:raisedButton];
41 raisedButton.translatesAutoresizingMaskIntoConstraints = NO;
42 [NSLayoutConstraint activateConstraints:@[
43 [raisedButton.centerXAnchor constraintEqualToAnchor:self.centerXAnchor],
44 [raisedButton.topAnchor constraintEqualToAnchor:self.topAnchor
45 constant:kTopPadding],
46 ]];
47 }
48
49 - (void)didTapEmailInstructions:(id)button {
50 [AppDelegate.instance emailSetupInstructions];
51 }
52
53 @end
OLDNEW
« 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