呈现的视图在 iPhone 中不起作用
我正在尝试通过单击 Facebook 应用程序中的按钮从一个页面导航到另一个页面。
我用于
registerUser=[[RegisterPage alloc]initWithNibName:@"RegisterPage" bundle:nil];
[self presentModalViewController :registerUser animated:YES];
在收到 facebook 的回复后呈现下一个视图。
但它没有显示下一个视图。它在我曾经提出其他观点的所有其他地方都运行良好。
有人对这个问题有想法吗?
I am trying to navigate from one page to another on a button click in a facebook appliaction.
I am using
registerUser=[[RegisterPage alloc]initWithNibName:@"RegisterPage" bundle:nil];
[self presentModalViewController :registerUser animated:YES];
for presenting the next view after getting response from facebook.
But it is not showing the next view. It works fine in all other places where I used to present other views.
Anyone have idea about this issue?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这里的‘自我’到底是什么?它是一个视图控制器吗?或者只是一个 UIView?
我认为这只有在 self 是视图控制器或其某个子类时才有效。
What exactly is 'self' here? Is it a viewcontroller? Or just a UIView?
I think this'll only work if self is a viewcontroller or some subclass of it.
我呈现视图控制器的代码有点像你的(没有笔尖):
呈现导航控制器就像这样(没有笔尖):
有时简单地复制某人的代码会有所帮助。
My code to present a view controller is somewhat like yours (without a nib):
And to present a navigation controller it's like this (without a nib):
Sometimes simply copying someones code helps.
感谢大家的回复。经过长时间的战斗,我已经解决了这个问题。我只是在发送下一个视图之前关闭了该视图,并将dismissmodalviewcontrollerAnimated设置为NO。
[self解雇ModalViewControllerAnimated:NO];
希望这对像我这样的人有帮助nextview = [[LoginPage alloc]initWithNibName:@"LoginPage"bundle:nil];
[selfpresentModalViewController:nextviewanimated:YES];
thanks for everyones reply.i have solved it after a long fight.i just dismissed the view before pesenting the next view and set dismissmodalviewcontrollerAnimated to NO.
[self dismissModalViewControllerAnimated:NO];
hope this help someone like menextview = [[LoginPage alloc]initWithNibName:@"LoginPage" bundle:nil];
[self presentModalViewController: nextview animated:YES];