-
Notifications
You must be signed in to change notification settings - Fork 14
/
CHTileView.h
56 lines (42 loc) · 1.36 KB
/
CHTileView.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
//
// CHTileView.h
//
// RELEASED UNDER THE MIT LICENSE
//
// Created by Cameron Kenly Hunt on 2/18/10.
// Copyright 2010 Cameron Kenley Hunt All rights reserved.
// http://cameron.io/project/chgridview
//
#import <UIKit/UIKit.h>
struct CHGridIndexPath {
int section;
int tileIndex;
};
typedef struct CHGridIndexPath CHGridIndexPath;
static CHGridIndexPath CHGridIndexPathMake(int section, int tileIndex){
CHGridIndexPath index; index.section = section; index.tileIndex = tileIndex; return index;
}
@interface CHTileView : UIView {
NSString *reuseIdentifier;
CHGridIndexPath indexPath;
CGSize padding;
BOOL selected;
BOOL highlighted;
UIColor *contentBackgroundColor;
CGSize shadowOffset;
UIColor *shadowColor;
CGFloat shadowBlur;
}
@property (nonatomic) CHGridIndexPath indexPath;
@property (nonatomic, readonly, copy) NSString *reuseIdentifier;
@property (nonatomic) BOOL selected;
@property (nonatomic) BOOL highlighted;
@property (nonatomic, retain) UIColor *contentBackgroundColor;
@property (nonatomic) CGSize shadowOffset;
@property (nonatomic, retain) UIColor *shadowColor;
@property (nonatomic) CGFloat shadowBlur;
- (id)initWithFrame:(CGRect)frame reuseIdentifier:(NSString *)reuseId;
// sub classes must implement drawContentRect:
- (void)drawContentRect:(CGRect)rect;
- (void)unselect;
@end