//
|
// CellOne.m
|
// BuWanVideo2.0
|
//
|
// Created by weikou2016 on 16/8/9.
|
// Copyright © 2016年 com.yeshi.buwansheque.ios. All rights reserved.
|
//
|
|
#import "CellOne.h"
|
#import "AllSpecialController.h"
|
|
@implementation CellOne
|
|
- (void)awakeFromNib {
|
[super awakeFromNib];
|
[self initScene];
|
}
|
|
-(void)initScene{
|
self.backgroundColor = kGlobalBackgroundColor;
|
|
UIView *backgroundView= [[UIView alloc] initWithFrame:CGRectMake(0, [CellOne getsdcheight], KScreenW, 27)];
|
backgroundView.backgroundColor = [UIColor whiteColor];
|
[self addSubview:backgroundView];
|
|
//视图上的小件 168 54
|
UIImageView * imagehuang = [[UIImageView alloc]initWithFrame:CGRectMake(KScreenW - 84, 0, 84, 27)];
|
imagehuang.image = [UIImage imageNamed:@"更多专题.png"];
|
[backgroundView addSubview:imagehuang];
|
|
UILabel * textLabel = [[UILabel alloc]initWithFrame:CGRectMake(KScreenW - 55, 0, 50, 27)];
|
textLabel.font = [UIFont systemFontOfSize:12];
|
textLabel.text = @"更多专题";
|
[backgroundView addSubview:textLabel];
|
|
_lable = [[UILabel alloc]initWithFrame:CGRectMake(10, 0, KScreenW - 90, 27)];
|
_lable.font = [UIFont systemFontOfSize:15];
|
_lable.text = @"";
|
_lable.textColor = [UIColor blackColor];
|
[backgroundView addSubview:_lable];
|
|
UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(Clicklable:)];
|
backgroundView.userInteractionEnabled = YES;
|
[backgroundView addGestureRecognizer:tap];
|
}
|
|
//更多专题
|
-(void)Clicklable:(id)sender{
|
AllSpecialController * allcontroller = [AllSpecialController new];
|
[allcontroller setHidesBottomBarWhenPushed:YES];
|
[[self viewController].navigationController pushViewController:allcontroller animated:YES];
|
}
|
|
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
|
[super setSelected:selected animated:animated];
|
}
|
|
+(float)getsdcheight{
|
return KScreenW*7 /16;
|
}
|
|
+(float)getHeight{
|
return KScreenW*7 /16 + 27;
|
}
|
|
- (UIViewController *)viewController {
|
for (UIView* next = [self superview]; next; next = next.superview) {
|
UIResponder *nextResponder = [next nextResponder];
|
if ([nextResponder isKindOfClass:[UIViewController class]]) {
|
return (UIViewController *)nextResponder;
|
}
|
}
|
return nil;
|
}
|
|
@end
|