44 lines
1.6 KiB
Objective-C
44 lines
1.6 KiB
Objective-C
#import "EventCenterEmptyCell.h"
|
|
|
|
@implementation EventCenterEmptyCell
|
|
{
|
|
UILabel *titleLabel;
|
|
UIImageView *ufoImageView;
|
|
}
|
|
|
|
+ (CGFloat)cellHeight {
|
|
return 170;
|
|
}
|
|
|
|
+ (void)registerTo:(UITableView *)tableView {
|
|
[tableView registerClass:[self class]
|
|
forCellReuseIdentifier:NSStringFromClass([self class])];
|
|
}
|
|
|
|
+ (EventCenterEmptyCell *)cellFor:(UITableView *)tableView atIndexPath:(NSIndexPath *)indexPath {
|
|
return [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([self class]) forIndexPath:indexPath];
|
|
}
|
|
|
|
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
|
|
if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
|
|
titleLabel = [UILabel labelInitWithText:YMLocalizedString(@"20.20.59_text_19")
|
|
font:kFontRegular(14)
|
|
textColor:UIColorFromRGB(0xafb1b3)];
|
|
ufoImageView = [[UIImageView alloc] initWithImage:kImage(@"common_empty_UFO")];
|
|
[self.contentView addSubview:ufoImageView];
|
|
[self.contentView addSubview:titleLabel];
|
|
[ufoImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.centerX.mas_equalTo(self.contentView);
|
|
make.top.mas_equalTo(16);
|
|
make.size.mas_equalTo(CGSizeMake(110, 110));
|
|
}];
|
|
[titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.centerX.mas_equalTo(self.contentView);
|
|
make.top.mas_equalTo(ufoImageView.mas_bottom).offset(16);
|
|
make.height.mas_equalTo(20);
|
|
}];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
@end |