EXC_BAD_ACCESS right after touchesBegan
问题 I have started a very simple project to learn iOS programming, but I get EXC_BAD_ACCESS after touchesBegan . You can download the project from DropBox here . I basically have a UIView subclass that should draw circles wherever the user is touching. Very simple but I cannot make it work. Any help is highly appreciated. Thanks! EDIT Turns out the problem is this line of code in touchesBegan : ts = [NSMutableSet setWithSet: [event touchesForView:self]]; That I changed into: ts = [[NSMutableSet