I have very strange error here is my snippet of code:
- (void) drawRect:(CGRect)rect{
CGRect fr = rect;
fr.size.width = fr.size.width-2*rad;
fr.size.height = fr.size.height-1;
fr.origin.x = rad;
// draw round corners layer
bglayer = [CALayer layer];
bglayer.borderWidth = 1;
bglayer.borderColor =开发者_开发知识库 [UIColor blackColor].CGColor; // Here I receive Error: Expected identifier before '[' token
bglayer.backgroundColor = bgColor.CGColor;
bglayer.cornerRadius = rad;
bglayer.frame = fr;
bglayer.zPosition = -5; // important, otherwise delete button does not fire / is covered
[self.layer addSublayer:bglayer];
......
.....
}
in line where: bglayer.borderColor = [UIColor blackColor].CGColor;
I receive this error:
Expected identifier before '[' token
Can somebody help me please :)
精彩评论