相关代码段如下:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
NSLog(@"%@ is touched",self);
//随机获取三原色代码
float red=(arc4random()%100)/100.0;
float green=(arc4random()%100)/100.0;
float blue=(arc4random()%100)/100.0;
UIColor *randomColor=[UIColor colorWithRed:red green:green blue:blue alpha:1.0];
self.circleColor=randomColor;
}
-(void)setCircleColor:(UIColor *)circleColor{
_circleColor=circleColor;
[self setNeedsDisplay];
}
运行后连控制台也不输出任何东西,请问是什么原因呢