mirror of
https://github.com/zhigang1992/transshift.git
synced 2026-06-11 08:49:31 +08:00
49 lines
1012 B
Objective-C
49 lines
1012 B
Objective-C
//
|
|
// HeaderView.m
|
|
// test
|
|
//
|
|
// Created by Alexey Chechetkin on 06.07.15.
|
|
// Copyright (c) 2015 Alexey Chechetkin. All rights reserved.
|
|
//
|
|
|
|
#import "FooterViewFreeSpace.h"
|
|
|
|
@implementation FooterViewFreeSpace
|
|
|
|
{
|
|
CGFloat _originalHeight;
|
|
}
|
|
|
|
+ (FooterViewFreeSpace*)view
|
|
{
|
|
NSArray *views = [[NSBundle mainBundle] loadNibNamed:@"FooterViewFreeSpace" owner:self options:nil];
|
|
FooterViewFreeSpace *view = [views firstObject];
|
|
|
|
view.icon.image = [view.icon.image imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate];
|
|
view.icon.tintColor = view.label.textColor;
|
|
|
|
return view;
|
|
}
|
|
|
|
- (void)setColor:(UIColor *)color
|
|
{
|
|
_label.textColor = color;
|
|
_icon.tintColor = color;
|
|
}
|
|
|
|
- (void)setBoundsFromTableView:(UITableView *)tableView
|
|
{
|
|
CGRect r = self.bounds;
|
|
r.size.width = tableView.bounds.size.width;
|
|
r.size.height = _originalHeight;
|
|
self.bounds = r;
|
|
}
|
|
|
|
- (void)awakeFromNib
|
|
{
|
|
[super awakeFromNib];
|
|
_originalHeight = self.bounds.size.height;
|
|
}
|
|
|
|
@end
|