という名前のUIViewControllerがありMainViewController
ます。SingleSearchView
フレームです。MainViewControllerのサブビューであるという名前のUIViewもあります。
そして、これsingleSearchView
をMainViewControllerに追加します。
self.singleSearchView = [[SearchView alloc] initWithFrame:CGRectMake(0, -480, 320, 480)];
[self.view addSubview:singleSearchView];
次のアニメーションを「切り替え」ようとするsingleSearchView
と、タッチ操作がブロックされます。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];
私もこの方法を試しました:
[UIView animateWithDuration:1.5 delay:0
options:UIViewAnimationOptionAllowUserInteraction
animations:^{
[self.view setFrame:CGRectMake(0, 480, 320, 480)];
}
completion:nil];
ありがとう