TouchEvent doubts in iphone
<p>HA ii ,i have two tableview in one view tableview and tab,the tab is hidden below the mainview,the user can see only tableview in the mainview,for viewing the tab the user have to click button just above the tab,when the user tap the button it drage upwards to the mainview i have done this by using this code </p>

<pre><code>-(IBAction) controlPanelShowHide:(id)sender
{

    CGRect frame = tab.frame;
    CGRect viewframe = hideviewoftab.frame;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.9];
    if (!self.isExpanded)
    {
        self.isExpanded = YES;
        if (frame.origin.y -=240) {

        tab.frame = frame;
        }
        if (imageframe.origin.y -=240) {
             btnShowHide.frame =imageframe;
        }
        if (viewframe.origin.y -=240) {
            hideviewoftab.frame =viewframe;
        }



    } else {
        self.isExpanded = NO;
        if (frame.origin.y +=240) {

            tab.frame = frame;
        }
        if (imageframe.origin.y +=240) {
            btnShowHide.frame =imageframe;
        }
        if (viewframe.origin.y +=240) {
            hideviewoftab.frame =viewframe;
        }


    }
    [UIView commitAnimations];

}
</code></pre>

<p>every things work fine with this code,but i need to drag this tab with touch event ,i.e. when the user tap and hold it and drag any-ware on the screen (upwards only)> i think this is done through <code>- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event</code>But how can we done this ?sorry for the very very poor english.Hope you understand my question.
thanks in advance. 
EDIT:</p>

<pre><code>- (void) touchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
{ CGPoint pt = [[touches anyObject] locationInView:self];     
    [tab beginAnimations:nil context:nil];
    [tab setAnimationDuration:0.1];             
    CGRect newFrame = tab.frame;
    newFrame.origin.y += pt.y - touchingPoint.y;    
    newFrame.origin.x += pt.x - touchingPoint.x;  
    [self setFrame:newFrame];   
    [tab commitAnimations]; 
}

- (void) touchesMoved:(NSSet*)touches withEvent:(UIEvent*)event 
{       
    CGPoint pt = [[touches anyObject] locationInView:self];     
    [tab beginAnimations:nil context:nil];
    [tab setAnimationDuration:0.1];             
    CGRect newFrame = tab.frame;
    newFrame.origin.y += pt.y - touchingPoint.y;    
    [self setFrame:newFrame];   
    [tab commitAnimations];     
}
</code></pre>
