我有一个按钮来改变BOOL
showSquare
等于YES
为什么这个if语句不起作用?
这是按钮
- (IBAction)Tap_Square:(id)sender {
[graphicsView setNeedsDisplay];
[graphicsView setShowSquare:YES];
}
的代码,这就是if语句
if (showSquare) {
CGContextSetFillColorWithColor(context, white);
CGContextFillRect(context, CGRectMake(90, 90, 100, 100));
}
我在干嘛有问题?
感谢
你的财产在哪里申报? – DrummerB 2012-08-16 01:49:32
确保'showSquare'为YES,并在'[graphicsView setShowSquare:YES]'上设置断点以确保它被执行 – 2012-08-16 01:49:38
尝试将yes更改为true? – alpera 2012-08-16 01:51:14