Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-18-2008, 02:37 AM
Junior Member
 
Join Date: Sep 2008
Posts: 6
Default touchesShouldBegin:(NSSet *)touches withEvent: inContentView: not get called

inherited a class from UIScrollView, according to doc,
(BOOL)touchesShouldBeginNSSet *)touches withEventUIEvent *)event inContentViewUIView *)view should be called when user tap the screen, but it never happens, anything wrong with the code?

@interface Piano2View : UIScrollView {
}

@end

@implementation Piano2View

- (id)initWithFrame: (CGRect)frame {
if (self = [super initWithFrame:frame]) {
// Initialization code
}
return self;
}

//Overridden by subclasses to customize the default behavior when a finger touches down in displayed content.

- (BOOL)touchesShouldBegin: (NSSet *)touches withEvent: (UIEvent *)event inContentView: (UIView *)view
{
UITouch* touch = [[event touchesForView:self] anyObject];
CGPoint location = [touch locationInView:self];

return YES;

}
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:19 AM.