// // Reprt4ViewCell.m // Ifish // // Created by imac on 16/8/30. // Copyright © 2016年 lianxiang. All rights reserved. // #import "Reprt4ViewCell.h" @implementation Reprt4ViewCell - (void)awakeFromNib { [super awakeFromNib]; // Initialization code self.faSongBtn.layer.masksToBounds = YES; self.faSongBtn.layer.cornerRadius = 5; } - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; // Configure the view for the selected state } -(void)cellSetBackViewCorner{ CGRect backRect= CGRectMake(self.cell4backView.bounds.origin.x,self.cell4backView.bounds.origin.x,kScreenSize.width-8*2,self.cell4backView.bounds.size.height); UIBezierPath *maskPath=[UIBezierPath bezierPathWithRoundedRect:backRect byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)]; CAShapeLayer *maskLayer =[[CAShapeLayer alloc] init]; maskLayer.frame = backRect; maskLayer.path = maskPath.CGPath; self.cell4backView.layer.mask = maskLayer; CGRect backlabel= CGRectMake(self.faSongBtn.bounds.origin.x,self.faSongBtn.bounds.origin.x,kScreenSize.width-8*2,self.faSongBtn.bounds.size.height); UIBezierPath *maskPath1=[UIBezierPath bezierPathWithRoundedRect:backRect byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)]; CAShapeLayer *maskLayer1 =[[CAShapeLayer alloc] init]; maskLayer1.frame = backlabel; maskLayer1.path = maskPath1.CGPath; self.faSongBtn.layer.mask = maskLayer1; } @end