I have an UIViewController named MainViewController
.
It's frame:
I also have an UIView named SingleSearchView
which is a subview of MainViewController.
And I add this singleSearchView
to the MainViewController:
self.singleSearchView = [[SearchView alloc] initWithFrame:CGRectMake(0, -480, 320, 480)];
[self.view addSubview:singleSearchView];
When I'm trying the following animation to "switch" to the singleSearchView
it blocks me from any touch interaction with the singleSearchView
[UIView beginAnimations:@"searchAnimation" context:nil];
[UIView setAnimationDelegate:self];
[UIView setAnimationDuration:1.0f];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationTransition:UIViewAnimationTransitionNone forView:self.singleSearchView cache:YES];
[self.view setFrame:CGRectMake(0, 480, 320, 480)];
[UIView commitAnimations];
I also tried this way:
[UIView animateWithDuration:1.5 delay:0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[self.view setFrame:CGRectMake(0, 480, 320, 480)];
}
completion:nil];
Thanks