i want to use UIScrollView in cocos2d game programming.
if i addSubview UIScrollView object to [[Director sharedDirector] openGLView]
it added in subview. but "touchesBegan" event delegate method not call back.
show below...
appDelegate.m
...
self.calScrollView = [[MyScrollView alloc] init];
self.calScrollView.pagingEnabled = YES;
self.calScrollView.showsHorizontalScrollIndicator = NO;
self.calScrollView.showsVerticalScrollIndicator = NO;
self.calScrollView.scrollsToTop = NO;
self.calScrollView.delegate = self;
...
[[[Director sharedDirector] openGLView] addSubview:self.calScrollView];
...
MyScrollView.m
...
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
NSLog(@"touchesBegan");
}
...
if you guess to "touchesBegan" will print in debugger console, that's wrong...
i want to print out "touchesBegan" message~! how can i do that?
would u know how to use to UIScrollView(or UIView) and cocos2d Perfectly?
feed any plz~ ;-)
(sorry ma thin english, but u can understand!;0)