Am getting this error message and matched my brackets and couldn’t find anything wrong. Can you find what’s wrong?
Thank you.
Error message is commented out on the relevant line; filename is MyHorizLine.m:
#import "MyHorizLine.h"
@implementation MyHorizLine
-(id)initWithCoder:(NSCoder *)decoder
{
self [super initWithCoder:decoder]; //Missing '[' at message send expression
if (self) {
self.backgroundColor = [UIColor clearColor];
}
return self;
}
-(void)drawRect:(CGRect)rect
{
CGContextRef c = UIGraphicsGetCurrentContext();
CGContextMoveToPoint(c, 0, 0);
CGContextAddLineToPoint(c, self.bounds.size.width, 0);
CGContextStrokePath(c);
}
@end
You’re missing an
=:should be