swipe action in UIScrollView

Discussion in 'iOS Programming' started by arnieterm, Dec 3, 2009.

  1. macrumors regular

    Joined:
    Aug 28, 2008
    #1
    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?


    Code:
    
    - (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
     
  2. Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    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.
     

Share This Page