hello this is my code is it wrong
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
NSLog(@"Inside touchesBegan");
UITouch *touch = [[event touchesForView:self.view] anyObject];
CGPoint location = [touch locationInView:touch.view];
NSLog(@"pointx: %f pointy:%f", location.x, location.y);
NSLog(@"about to enter do");
if(CGRectContainsPoint(b_do.frame, location))
{
NSLog(@"inside do");
[self b_do];
[b_do setHighlighted:YES];
}
}
in the log i got this :
2010-10-15 21:00:42.555 phone[14280:207] Inside touchesBegan
2010-10-15 21:00:42.557 phone[14280:207] pointx: 0.000000 pointy:0.000000
2010-10-15 21:00:42.557 phone[14280:207] about to enter do
2010-10-15 21:00:42.558 phone[14280:207] about to exit touchesBegan