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

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

Issue 2805273002: [Payment Request] Selector view controller (Closed)
Patch Set: Addressed comments 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
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 message to display.
17 @property(nonatomic, copy) NSString* text; 17 @property(nonatomic, nullable, copy) NSString* text;
18 18
19 // The image to display. 19 // The image to display.
20 @property(nonatomic, strong) UIImage* image; 20 @property(nonatomic, nullable, strong) UIImage* image;
21
22 // The font of the text. Default is the regular Roboto font of size 14.
23 @property(nonatomic, null_resettable, copy) UIFont* textFont;
lpromero 2017/04/11 15:59:06 This goes on the "styling" idea territory. Is this
Moe 2017/04/14 06:05:49 Removed the style properties from the item and mov
24
25 // The color of the text. Default is the 900 tint color of the grey palette.
26 @property(nonatomic, null_resettable, copy) UIColor* textColor;
21 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 text label and an optional image. The label is laid out to fill the full
26 // width of the cell and is wrapped as needed to fit in the cell. The image is 32 // width of the cell and is wrapped as needed to fit in the cell. The image is
27 // laid out on the leading edge of the cell. The text label is laid out on the 33 // laid out on the leading edge of the cell. The text label is laid out on the
28 // the trailing edge of the image, if one exists, or the leading edge of the 34 // the trailing edge of the image, if one exists, or the leading edge of the
29 // cell otherwise, up to the trailing edge of the cell. This is suitable for 35 // cell otherwise, up to the trailing edge of the cell. This is suitable for
30 // displaying text that needs to wrap which may or may not feature an image. 36 // displaying text that needs to wrap which may or may not feature an image.
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, nullable, strong) UILabel* textLabel;
35 41
36 // UIImageView corresponding to |image| from the item. 42 // UIImageView corresponding to |image| from the item.
37 @property(nonatomic, readonly, strong) UIImageView* imageView; 43 @property(nonatomic, readonly, nullable, strong) UIImageView* imageView;
38 44
39 @end 45 @end
40 46
41 #endif // IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_ 47 #endif // IOS_CHROME_BROWSER_PAYMENTS_CELLS_PAYMENTS_TEXT_ITEM_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698