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

Side by Side Diff: ios/chrome/browser/ui/settings/cells/text_and_error_item.h

Issue 2814793003: Adds accessoryType property to CollectionViewItem (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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ 5 #ifndef IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_
6 #define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ 6 #define IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_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 // TextAndErrorItem: Displays a text label and might containg an accessory type. 13 // TextAndErrorItem: Displays a text label and might containg an accessory type.
14 // It might also display an error icon at the right side of the cell if the 14 // It might also display an error icon at the right side of the cell if the
15 // shouldDisplayError flag is set to true. 15 // shouldDisplayError flag is set to true.
16 @interface TextAndErrorItem : CollectionViewItem 16 @interface TextAndErrorItem : CollectionViewItem
17 17
18 // Item text. 18 // Item text.
19 @property(nonatomic, copy) NSString* text; 19 @property(nonatomic, copy) NSString* text;
20 20
21 // Boolean to display or hide the error icon. 21 // Boolean to display or hide the error icon.
22 @property(nonatomic, assign) BOOL shouldDisplayError; 22 @property(nonatomic, assign) BOOL shouldDisplayError;
23 23
24 // The accessory type for the represented cell.
25 @property(nonatomic) MDCCollectionViewCellAccessoryType accessoryType;
26
27 // Whether or not the item is enabled. 24 // Whether or not the item is enabled.
28 @property(nonatomic, assign, getter=isEnabled) BOOL enabled; 25 @property(nonatomic, assign, getter=isEnabled) BOOL enabled;
29 26
30 @end 27 @end
31 28
32 @interface TextAndErrorCell : MDCCollectionViewCell 29 @interface TextAndErrorCell : MDCCollectionViewCell
33 30
34 // Cell title. 31 // Cell title.
35 @property(nonatomic, readonly, strong) UILabel* textLabel; 32 @property(nonatomic, readonly, strong) UILabel* textLabel;
36 33
37 // Error icon that will be displayed on the right side of the cell. 34 // Error icon that will be displayed on the right side of the cell.
38 @property(nonatomic, readonly, strong) UIImageView* errorIcon; 35 @property(nonatomic, readonly, strong) UIImageView* errorIcon;
39 36
40 @end 37 @end
41 38
42 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_ 39 #endif // IOS_CHROME_BROWSER_UI_SETTINGS_CELLS_TEXT_AND_ERROR_ITEM_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/ui/settings/cells/encryption_item.mm ('k') | ios/chrome/browser/ui/settings/cells/text_and_error_item.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698