標準の右から左への切り替えではなく、下から上への表示コントローラーの解除を試みています。これはすべて可能ですか?ここに私がこれまで持っているコードはあります:右から左にではなく、下から上へUIViewControllerを閉じる
CGRect screenRect = [[UIScreen mainScreen] applicationFrame];
CGRect endFrame = self.view.frame;
endFrame.origin.y = screenRect.origin.y - screenRect.size.height;
UIView *aView = [[self.view retain] autorelease];
[self.view.window addSubview:aView];
aView.frame = CGRectMake(0, 0, 320, 460);
[UIView animateWithDuration:0.5
animations:^{
[UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
aView.frame = endFrame;
}
completion:^(BOOL finished) {
[self dismissModalViewControllerAnimated:NO];
[aView removeFromSuperview];
}
];
これは遷移の結果です。以前のビューコントローラーは、アニメーションの後まで表示されません。なぜなら、アニメーションが完了した後まで解消できないからです...アイデアは何ですか?
ナビゲーションコントローラベースのアプリケーションを使用していますか? – booleanBoy
はい、ナビゲーションコントローラベースのアプリケーションです – avenged
presentModalViewControllerを試しましたか? – booleanBoy