IPhone problem with loading view with button

In one of my classes I have a button that when pressed loads another view controller and view. This is what I use:

FormController *formController1=[[FormController alloc]initWithNibName:nil bundle:nil];
[self presentModalViewController:formController1 animated:YES];

The problem is that it loads the full view, but not the navigation bar that comes with all the other views. What am I doing wrong?

Maybe you shouldn’t be using a modal view controller. If you want the view to appear as part of the navigation stack, you need to load push the view controller onto the navigation view’s stack.

If you want the new modal view controller to be a navigation view controller, then make formController
the root view controller of a UINavigationController, and present the navigation controller as the modal view controller.

Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 移动开发 » IPhone problem with loading view with button

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录