forked from bestswifter/MySampleCode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKtBaseTableViewCell.m
More file actions
37 lines (29 loc) · 959 Bytes
/
KtBaseTableViewCell.m
File metadata and controls
37 lines (29 loc) · 959 Bytes
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
//
// KtBaseTableViewCell.m
// KtTableView
//
// Created by baidu on 16/4/13.
// Copyright © 2016年 zxy. All rights reserved.
//
#import "KtBaseTableViewCell.h"
#import "KtTableViewBaseItem.h"
#import "UIView+KtExtension.h"
@implementation KtBaseTableViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
- (void)setObject:(KtTableViewBaseItem *)object { // 子类在这个方法中解析数据
self.imageView.image = object.itemImage;
self.textLabel.text = object.itemTitle;
self.detailTextLabel.text = object.itemSubtitle;
self.accessoryView = [[UIImageView alloc] initWithImage:object.itemAccessoryImage];
}
+ (CGFloat)tableView:(UITableView*)tableView rowHeightForObject:(KtTableViewBaseItem *)object {
return 44.0f;
}
@end