I'm stuck here
I have my own scrollview in the scroll view, which has an add field button that allows the user to add a new text field to the scrollview. When the user clicks on a specific text field keyboard and hides the text field to overcome this, I followed the UICatalog example, but it moves the whole scroll up
to prevent this, I executed the UICatalog example and did it
-(void)textFieldDidBeginEditing:(UITextField *)sender
{
if (sender.frame.origin.y>109) {
moveScrollViewUpBy=(sender.frame.origin.y-109+10);
[self viewMovedUp:YES];
}
}
-(void)viewMovedUp:(BOOL)movedUp
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.3];
CGRect rect = formScrollView.frame;
if (movedUp)
{
if(rect.origin.y == 0.0f){
rect.origin.y -= kOFFSET_FOR_KEYBOARD;
rect.size.height += kOFFSET_FOR_KEYBOARD;
}
}
else
{
if(rect.origin.y != 0.0f){
rect.origin.y += kOFFSET_FOR_KEYBOARD;
rect.size.height -= kOFFSET_FOR_KEYBOARD;
}
}
self.formScrollView = rect;
[UIView commitAnimations];
}
here
#define kOFFSET_FOR_KEYBOARD 160.0
but it shifts the scroll view up,
I want that when I click the text box below in the scroll, scroll through the scroll scrolls and the text box appears ....
Can this be done ... otherwise suggest a different solution
srollview , .