Chromium Code Reviews| 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..3c8bfe0694018e8b5145c17a1e28a3d4be06f97e |
| --- /dev/null |
| +++ b/remoting/ios/app/host_setup_footer_view.mm |
| @@ -0,0 +1,51 @@ |
| +// 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/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:UIColor.whiteColor forState:UIControlStateNormal]; |
|
nicholss
2017/06/27 16:36:01
whiteColor should come from RemotingTheme
Yuwei
2017/06/27 20:46:45
Done.
|
| + [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 { |
| + NSLog(@"Tapped email instructions."); |
|
nicholss
2017/06/27 16:36:01
Here you can do what I did in the settings menu an
Yuwei
2017/06/27 20:46:45
Done.
|
| +} |
| + |
| +@end |