-(void) DrawRect: (cgrect) rect
{
if ([Self.state isequaltostring:@ "1"]) {//Top fillet
Uibezierpath *maskpath = [Uibezierpath bezierPathWithRoundedRect:self.bounds byroundingcorners:uirectcornertopright | Uirectcornertopleft Cornerradii:cgsizemake (10, 10)];
Cashapelayer *masklayer = [[Cashapelayer alloc] init];
Masklayer.frame = Self.bounds;
Masklayer.path = Maskpath.cgpath;
Self.layer.mask = Masklayer;
else if ([Self.state isequaltostring:@ "2"]) {//lower rounded
Uibezierpath *maskpath = [Uibezierpath bezierPathWithRoundedRect:self.bounds byroundingcorners: Uirectcornerbottomright | Uirectcornerbottomleft Cornerradii:cgsizemake (10, 10)];
Cashapelayer *masklayer = [[Cashapelayer alloc] init];
Masklayer.frame = Self.bounds;
Masklayer.path = Maskpath.cgpath;
Self.layer.mask = Masklayer;
}
Cell Split Line
Calayer *bottomborder = [Calayer layer];
Bottomborder.frame = CGRectMake (0,self.frame.size.height-1,self.frame.size.width, 1);
Bottomborder.backgroundcolor = Color_sep. Cgcolor;
[Self.layer Addsublayer:bottomborder];
}