我正在进行paypal集成,我的项目运行良好。
但是我想从我当前的视图中推送我的下一个视图。 首先我使用了导航控制器,但现在我想推出导航控制器。
我用导航控制器的语法是
[self.navigationController pushViewController:[[[NextViewController alloc] initWithURL:[ECNetworkHandler sharedInstance].redirectURL returnURL:RETURN_URL cancelURL:CANCEL_URL] autorelease] animated:TRUE];我使用语法推送另一个没有导航控制器的视图控制器
NextViewController *webVcustome = [[NextViewController alloc]initWithURL:[ECNetworkHandler sharedInstance].redirectURL returnURL:RETURN_URL cancelURL:CANCEL_URL]; [self.view addSubview:webVcustome.view];使用导航它可以工作但没有导航它没有。
我该怎么做推动视图控制器。
I am doing paypal integration and my project is working good.
But i want to push my Next view from my current view. first i used Navigation Controller but now i want to push it with out navigation controller.
I used the syntax with Navigation controller is
[self.navigationController pushViewController:[[[NextViewController alloc] initWithURL:[ECNetworkHandler sharedInstance].redirectURL returnURL:RETURN_URL cancelURL:CANCEL_URL] autorelease] animated:TRUE];And i used the syntax to push another view controller without navigation controller is
NextViewController *webVcustome = [[NextViewController alloc]initWithURL:[ECNetworkHandler sharedInstance].redirectURL returnURL:RETURN_URL cancelURL:CANCEL_URL]; [self.view addSubview:webVcustome.view];With Navigation it works but without navigation it don't.
What should i do to push the view controller.
最满意答案
而不是添加子视图调用presentViewController:animated:completion ,如下所示:
[self presentViewController:webVcustome animated:YES completion:nil];有关此消息的更多信息,请查看文档
instead of adding a subview call presentViewController:animated:completion, like this:
[self presentViewController:webVcustome animated:YES completion:nil];for more information of this message take a look to the documentation
更多推荐
发布评论