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
//
// GMBaseTableViewCell.h
// Gengmei
//
// Created by 翟国钧 on 15/1/14.
// Copyright (c) 2015年 Wanmeichuangyi. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "GMReuseIdentifier.h"
@interface GMTableViewCell : UITableViewCell <GMReuseIdentifier> {
UIImageView *_detailDisclosure;
}
@property (nonatomic, strong) NSIndexPath *indexPath;
@property (nonatomic, strong) UIImageView *detailDisclosure;
/** @brief Cell统一下边框。不需要时需要隐藏. 默认颜色为SEPARATOR_LINE_COLOR */
@property (nonatomic , strong) UIView *bottomLine;
/**
某些卡片底部的20px背景, BACKGROUND_COLOR
*/
@property (nonatomic, strong) UIView *separatedView;
/**
* @brief 代替 UITableViewCellAccessoryDetailDisclosureButton,默认 NO,不显示。控制的是 _detailDisclosure。
*/
@property (nonatomic, assign) BOOL showArrow;
/**
* @brief 重写的起点。如果想在cell里添加息定义的view,或者改变bottomLine,从这里开始。
* 必须调用super
*/
- (void)setup __attribute__((objc_requires_super));
#pragma mark - Autolayout
/**
* @author wangyang, 15-11-02 11:11:48
*
* @brief 在 lifeCycle 里调用。里面为固定不变的约束
* @since 5.4.0
*/
- (void)cellConstraints;
/**
* @author wangyang, 15-11-02 11:11:48
*
* @brief 在 lifeCycle 里调用。需要变化的约束写在这里
* @since 5.4.0
*/
- (void)updateCellConstraints NS_SWIFT_NAME(updateCellConstraints());
/**
改变 bottomLine 的左右约束
*/
- (void)updateBottomLineConstraintsWithLeft:(CGFloat)left right:(CGFloat)right;
@end
@interface UITableViewCell (Reusable) <GMReuseIdentifier>
+ (NSString *)defaultReuseIdentifier;
@end