ifish/Ifish/controllers/IfishTabControllers/探索/lookafterWorkbech/KanHuWorkHeaderViewCell.m

47 lines
1.6 KiB
Objective-C

//
// KanHuWorkHeaderViewCell.m
// Ifish
//
// Created by imac on 16/8/24.
// Copyright © 2016年 lianxiang. All rights reserved.
//
#import "KanHuWorkHeaderViewCell.h"
@implementation KanHuWorkHeaderViewCell
- (void)awakeFromNib {
[super awakeFromNib];
// Initialization code
//设置view 上半部圆角
// UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:self.listCellHeadBack.bounds byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(5, 5)];
// CAShapeLayer *maskLayer =[[CAShapeLayer alloc] init];
// maskLayer.frame = self.listCellHeadBack.bounds;
// maskLayer.path = maskPath.CGPath;
// self.listCellHeadBack.layer.mask = maskLayer;
// self.listCellHeadBack.layer.backgroundColor = [UIColor redColor].CGColor;
}
-(void)layoutSubviews{
CGRect backRect= CGRectMake(self.listCellHeadBack.bounds.origin.x,self.listCellHeadBack.bounds.origin.x,kScreenSize.width-8*2,self.listCellHeadBack.bounds.size.height);
UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:backRect byRoundingCorners:UIRectCornerTopRight | UIRectCornerTopLeft cornerRadii:CGSizeMake(5, 5)];
CAShapeLayer *maskLayer =[[CAShapeLayer alloc] init];
maskLayer.frame = backRect;
maskLayer.path = maskPath.CGPath;
self.listCellHeadBack.layer.mask = maskLayer;
//self.listCellHeadBack.layer.backgroundColor = [UIColor redColor].CGColor;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated];
// Configure the view for the selected state
}
@end