Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #import "remoting/ios/app/pin_entry_view.h" | 9 #import "remoting/ios/app/pin_entry_view.h" |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 | 39 |
| 40 _pairingLabel = [[UILabel alloc] init]; | 40 _pairingLabel = [[UILabel alloc] init]; |
| 41 _pairingLabel.textColor = | 41 _pairingLabel.textColor = |
| 42 [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:0.5]; | 42 [UIColor colorWithRed:1.f green:1.f blue:1.f alpha:0.5]; |
| 43 _pairingLabel.font = [UIFont systemFontOfSize:12.f]; | 43 _pairingLabel.font = [UIFont systemFontOfSize:12.f]; |
| 44 _pairingLabel.text = @"Remember my PIN on this device."; | 44 _pairingLabel.text = @"Remember my PIN on this device."; |
| 45 [self addSubview:_pairingLabel]; | 45 [self addSubview:_pairingLabel]; |
| 46 | 46 |
| 47 _pinButton = | 47 _pinButton = |
| 48 [MDCFloatingButton floatingButtonWithShape:MDCFloatingButtonShapeMini]; | 48 [MDCFloatingButton floatingButtonWithShape:MDCFloatingButtonShapeMini]; |
| 49 [_pinButton setTitle:@"+" forState:UIControlStateNormal]; | 49 [_pinButton setBackgroundColor:UIColor.whiteColor |
|
nicholss
2017/06/07 21:01:42
No more + ?
Yuwei
2017/06/07 22:25:22
Yep. Replaced by ->
| |
| 50 forState:UIControlStateNormal]; | |
| 50 | 51 |
| 51 // TODO(nicholss): Update "->" to the arrow icon. | 52 // TODO(nicholss): Update "->" to the arrow icon. |
| 52 [_pinButton setTitle:@"->" forState:UIControlStateNormal]; | 53 [_pinButton setTitle:@"->" forState:UIControlStateNormal]; |
| 53 [_pinButton addTarget:self | 54 [_pinButton addTarget:self |
| 54 action:@selector(didTapPinEntry:) | 55 action:@selector(didTapPinEntry:) |
| 55 forControlEvents:UIControlEventTouchUpInside]; | 56 forControlEvents:UIControlEventTouchUpInside]; |
| 56 _pinButton.translatesAutoresizingMaskIntoConstraints = NO; | 57 _pinButton.translatesAutoresizingMaskIntoConstraints = NO; |
| 57 [self addSubview:_pinButton]; | 58 [self addSubview:_pinButton]; |
| 58 | 59 |
| 59 _pinEntry = [[UITextField alloc] init]; | 60 _pinEntry = [[UITextField alloc] init]; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 } | 115 } |
| 115 | 116 |
| 116 #pragma mark - Private | 117 #pragma mark - Private |
| 117 | 118 |
| 118 - (void)didTapPinEntry:(id)sender { | 119 - (void)didTapPinEntry:(id)sender { |
| 119 [_delegate didProvidePin:_pinEntry.text createPairing:_pairingSwitch.isOn]; | 120 [_delegate didProvidePin:_pinEntry.text createPairing:_pairingSwitch.isOn]; |
| 120 [_pinEntry endEditing:YES]; | 121 [_pinEntry endEditing:YES]; |
| 121 } | 122 } |
| 122 | 123 |
| 123 @end | 124 @end |
| OLD | NEW |