使用Pushviewcontroller自下而上的动画?

sen*_*thu 8 iphone object objective-c

我是Iphone SDK的新手.我正在使用以下代码.但是当我点击这个按钮时,动画从右到左发生.我想要从botton到Up

- (IBAction)clickedsButton:(id)sender
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:1.0];
    [UIView setAnimationDuration:0.75];
    [self.navigationController pushViewController:settingsController animated:TRUE];
    [UIView commitAnimations];
}
Run Code Online (Sandbox Code Playgroud)

setAnimationTransition只支持两个... 1)UIViewAnimationTransitionFlipFromLeft 2)UIViewAnimationTransitionFlipFromRight ..有什么帮助吗?我使用了以下,但它不起作用

settingsController.modalTransitionStyle =  UIModalTransitionStyleCoverVertical;
[self.navigationController pushViewController:settingsController animated:YES];
Run Code Online (Sandbox Code Playgroud)

Jas*_*ien 5

你在寻找什么

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated;
Run Code Online (Sandbox Code Playgroud)

  • 与presentModalViewController相反:animated:is dismissModalViewController:animated: (3认同)
  • 我想这样做,只通过PUSHVIEWCONTROLLER.因为我曾经使用popviewcontroller,下一个视图控制器(settingsController)将presentModalViewController支持popviewcontroller .... (2认同)