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

Side by Side Diff: ios/chrome/browser/payments/cells/payments_text_item.h

Issue 2821043002: [Payment Request] Adds a secondary text label to PaymentsTextCell (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | ios/chrome/browser/payments/cells/payments_text_item.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_ 5 #ifndef IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_
6 #define IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_ 6 #define IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_
7 7
8 #import <UIKit/UIKit.h> 8 #import <UIKit/UIKit.h>
9 9
10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h" 10 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_item.h"
11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h" 11 #import "ios/third_party/material_components_ios/src/components/CollectionCells/ src/MaterialCollectionCells.h"
12 12
13 // PaymentsTextItem is the model class corresponding to PaymentsTextCell. 13 // PaymentsTextItem is the model class corresponding to PaymentsTextCell.
14 @interface PaymentsTextItem : CollectionViewItem 14 @interface PaymentsTextItem : CollectionViewItem
15 15
16 // The message to display. 16 // The main text to display.
17 @property(nonatomic, copy) NSString* text; 17 @property(nonatomic, copy) NSString* text;
18 18
19 // The secondary text to display.
20 @property(nonatomic, copy) NSString* detailText;
21
19 // The image to display. 22 // The image to display.
20 @property(nonatomic, strong) UIImage* image; 23 @property(nonatomic, strong) UIImage* image;
21 24
25 // The accessory type for the represented cell.
26 @property(nonatomic) MDCCollectionViewCellAccessoryType accessoryType;
27
22 @end 28 @end
23 29
24 // PaymentsTextCell implements a MDCCollectionViewCell subclass containing 30 // PaymentsTextCell implements a MDCCollectionViewCell subclass containing
25 // a text label and an optional image. The label is laid out to fill the full 31 // a main text label, a secondary text label and an optional image. The labels
26 // width of the cell and is wrapped as needed to fit in the cell. The image is 32 // are laid out to fill the full width of the cell and are wrapped as needed to
27 // laid out on the leading edge of the cell. The text label is laid out on the 33 // fit in the cell. The image is laid out on the leading edge of the cell. The
28 // the trailing edge of the image, if one exists, or the leading edge of the 34 // text labels are laid out on the the trailing edge of the image, if one
29 // cell otherwise, up to the trailing edge of the cell. This is suitable for 35 // exists, or the leading edge of the cell otherwise, up to the trailing edge of
30 // displaying text that needs to wrap which may or may not feature an image. 36 // the cell.
31 @interface PaymentsTextCell : MDCCollectionViewCell 37 @interface PaymentsTextCell : MDCCollectionViewCell
32 38
33 // UILabel corresponding to |text| from the item. 39 // UILabel corresponding to |text| from the item.
34 @property(nonatomic, readonly, strong) UILabel* textLabel; 40 @property(nonatomic, readonly, strong) UILabel* textLabel;
35 41
42 // UILabel corresponding to |detailText| from the item.
43 @property(nonatomic, readonly, strong) UILabel* detailTextLabel;
44
36 // UIImageView corresponding to |image| from the item. 45 // UIImageView corresponding to |image| from the item.
37 @property(nonatomic, readonly, strong) UIImageView* imageView; 46 @property(nonatomic, readonly, strong) UIImageView* imageView;
38 47
39 @end 48 @end
40 49
41 #endif // IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_ 50 #endif // IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_
OLDNEW
« no previous file with comments | « no previous file | ios/chrome/browser/payments/cells/payments_text_item.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698