to close a keyboard
Code:
[txtField resignFirstResponder];
to know where are you during the scroll of scrollview.
Code:
- (void)scrollViewDidScroll:(UIScrollView *)sender {
int page = floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;
NSLog(@"page:%d",page);
}
where pageWidth is your view width (assuming that both have the same width)
so if page = 1 you are on first subview, else you are on second subview.
Create a int that contain currentPage, and when it change to 1, resignFirstResponder your textField.