OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_ |
| 6 #define IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_ |
| 7 |
| 8 #import <UIKit/UIKit.h> |
| 9 |
| 10 typedef void (^URLActionBlock)(NSString*); |
| 11 |
| 12 @class PhysicalWebDevice; |
| 13 |
| 14 // A UITableViewCell containing a NotificationCenterURLButton. |
| 15 // The text and url can be set again to allow reuse of button. |
| 16 // The icon cannot be changed, so buttons with different icons must use |
| 17 // different |reuseIdentifier|. |
| 18 @interface URLTableCell : UITableViewCell |
| 19 - (instancetype)initWithTitle:(NSString*)title |
| 20 url:(NSString*)url |
| 21 icon:(NSString*)icon |
| 22 leftInset:(CGFloat)leftInset |
| 23 reuseIdentifier:(NSString*)reuseIdentifier |
| 24 block:(URLActionBlock)block; |
| 25 |
| 26 // Sets the title and url of the button. The unescaped URL will be used as |
| 27 // subtitle and passed as a parameter to the block. |
| 28 - (void)setTitle:(NSString*)title url:(NSString*)url; |
| 29 |
| 30 // Show (or hide) a bottom separator below the button. |
| 31 // The separator is handled manually as it is not possible to hide only the last |
| 32 // separator in UITableView. |
| 33 - (void)setSeparatorVisible:(BOOL)visible; |
| 34 |
| 35 @end |
| 36 |
| 37 #endif // IOS_CHROME_TODAY_EXTENSION_URL_TABLE_CELL_H_ |
OLD | NEW |