PDA

View Full Version : swipe action in UIScrollView




arnieterm
Dec 3, 2009, 08:42 AM
I have an application with nested scrollviews. I have to handle swipes in the inner scrollview.Does i need to subclass UIScrollView in order to do this and implement the below given methods?




- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{

}

- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
NSLog(@"Moved %@",touches);
}

- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
NSLog(@"Ended %@",touches);
}

- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{

}


Is there any other way to handle this? I do not want to subclass the UIScrollVIew
Thanks
Arnieterm



dejo
Dec 3, 2009, 09:27 AM
I have an application with nested scrollviews.
There's your problem! :D

Such a UI is just going to be confusing to your end user. I would suggest taking a different approach, one that doesn't involve nested scrollviews.