-
Notifications
You must be signed in to change notification settings - Fork 6
/
ContentTableViewController.h
61 lines (49 loc) 路 2.02 KB
/
ContentTableViewController.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
//
// ContentTableViewController.h
// ContentTableViewController
//
// Created by Julian Weiss on 2/20/15.
// Copyright (c) 2015 insanj. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ContentTableViewControllerDelegate.h"
#import "ContentVideoItem.h"
@interface ContentTableViewController : UITableViewController
/**
* Insets applied to the inside of the cell, @b defaults to 10.0, 5.0, 10.0, 5.0
*/
@property (nonatomic, readwrite) UIEdgeInsets itemCellInsets;
/**
* Background color of each item cell, defaults to @b clearColor with the @p tableView itself being @p whiteColor
*/
@property (strong, nonatomic) UIColor *itemCellBackgroundColor;
/**
* Content display mode of each item cell, applied to the principal displaying object (e.g. @p UILabel, @p UIImageView), defaults to @b UIViewContentModeLeft
*/
@property (nonatomic, readwrite) UIViewContentMode itemCellContentMode;
/**
* Attributes used when drawing @p NSString items. Defaults to @p [UIFont @p fontWithName:@"AvenirNext-Regular" @p size:18.0]
*/
@property (strong, nonatomic) NSDictionary *itemCellTextAttributes;
/**
* Attributes used when drawing @p NSURL items. Defaults to @p [UIFont @p fontWithName:@"AvenirNext-Regular" @p size:18.0] with @b blueColor
*/
@property (strong, nonatomic) NSDictionary *itemCellLinkAttributes;
/**
* All items currently displayed, defaults to an empty array, with a empty state for the table.
* @p NSString, @p NSAttributedString, @p UIImage, @p UIView, @p NSURL
*/
@property (strong, nonatomic) NSArray *items;
/**
* Placeholder view shown when the table has an empty state
*/
@property (strong, nonatomic) UIView *emptyPlaceholderView;
/**
* Optional delegate which handles taps on item cells. By default, cells are not interactable
*/
@property (strong, nonatomic) NSObject<ContentTableViewControllerDelegate> *contentDelegate;
/**
* Create a new @p ContentTableViewController instance with given items (conforming to the equivalent propery, @p items)
*/
- (instancetype)initWithItems:(NSArray *)items;
@end