我在“[subview touchesBegan:touches withEvent:event];”这一行得到一个 EXC_BAD_ACCESS。当我删除那条线时,一切正常。我做错了什么?
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
for(UIView *subview in [self.view subviews]) {
NSLog(@"%@", subview);
NSLog(@"%@", touches);
NSLog(@"%@", event);
[subview touchesBegan:touches withEvent:event];
}
}