| 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 #import "ios/chrome/browser/ui/payments/cells/accepted_payment_methods_item.h" | 5 #import "ios/chrome/browser/ui/payments/cells/accepted_payment_methods_item.h" |
| 6 | 6 |
| 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" | 7 #import "ios/chrome/browser/ui/colors/MDCPalette+CrAdditions.h" |
| 8 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 8 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 9 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" | 9 #import "ios/third_party/material_components_ios/src/components/Typography/src/M
aterialTypography.h" |
| 10 | 10 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 - (void)configureCell:(AcceptedPaymentMethodsCell*)cell { | 38 - (void)configureCell:(AcceptedPaymentMethodsCell*)cell { |
| 39 [super configureCell:cell]; | 39 [super configureCell:cell]; |
| 40 cell.messageLabel.text = self.message; | 40 cell.messageLabel.text = self.message; |
| 41 | 41 |
| 42 NSMutableArray* methodTypeIconViews = [NSMutableArray array]; | 42 NSMutableArray* methodTypeIconViews = [NSMutableArray array]; |
| 43 for (UIImage* methodTypeIcon in self.methodTypeIcons) { | 43 for (UIImage* methodTypeIcon in self.methodTypeIcons) { |
| 44 UIImageView* methodTypeIconView = | 44 UIImageView* methodTypeIconView = |
| 45 [[UIImageView alloc] initWithFrame:CGRectZero]; | 45 [[UIImageView alloc] initWithFrame:CGRectZero]; |
| 46 methodTypeIconView.image = methodTypeIcon; | 46 methodTypeIconView.image = methodTypeIcon; |
| 47 methodTypeIconView.accessibilityLabel = methodTypeIcon.accessibilityLabel; | 47 methodTypeIconView.accessibilityLabel = methodTypeIcon.accessibilityLabel; |
| 48 methodTypeIconView.layer.borderColor = | |
| 49 [UIColor colorWithWhite:0.9 alpha:1.0].CGColor; | |
| 50 methodTypeIconView.layer.borderWidth = 1.0; | |
| 51 [methodTypeIconViews addObject:methodTypeIconView]; | 48 [methodTypeIconViews addObject:methodTypeIconView]; |
| 52 } | 49 } |
| 53 cell.methodTypeIconViews = methodTypeIconViews; | 50 cell.methodTypeIconViews = methodTypeIconViews; |
| 54 } | 51 } |
| 55 | 52 |
| 56 @end | 53 @end |
| 57 | 54 |
| 58 @implementation AcceptedPaymentMethodsCell { | 55 @implementation AcceptedPaymentMethodsCell { |
| 59 UIStackView* _stackView; | 56 UIStackView* _stackView; |
| 60 } | 57 } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 [self.methodTypeIconViews valueForKeyPath:@"accessibilityLabel"]; | 162 [self.methodTypeIconViews valueForKeyPath:@"accessibilityLabel"]; |
| 166 NSString* concatenatedAccessibilityLabel = | 163 NSString* concatenatedAccessibilityLabel = |
| 167 [iconsAccessibilityLabels componentsJoinedByString:@", "]; | 164 [iconsAccessibilityLabels componentsJoinedByString:@", "]; |
| 168 if (concatenatedAccessibilityLabel.length) { | 165 if (concatenatedAccessibilityLabel.length) { |
| 169 [accessibilityLabel appendFormat:@", %@", concatenatedAccessibilityLabel]; | 166 [accessibilityLabel appendFormat:@", %@", concatenatedAccessibilityLabel]; |
| 170 } | 167 } |
| 171 return accessibilityLabel; | 168 return accessibilityLabel; |
| 172 } | 169 } |
| 173 | 170 |
| 174 @end | 171 @end |
| OLD | NEW |