且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何使用父级的导航控制器以模态显示视图控制器?

更新时间:2023-02-16 08:42:41

是在自动继承UIViewController还是其他?尽管我通常不使用笔尖进行操作,但我已经通过导航控制器成功完成了此视图.首先查看视图是否成功,然后再尝试presentModalView.

Is self subclassing UIViewController or something else? I have successfully done a view with a nav controller this way although I don't usually do it with a nib. See if you have success with pushing the view first and then try to presentModalView.

我也建议使用委托方法来实现这一点.尽管对于您的工作不是必需的,但您会发现以后会遇到较少的问题,并且可能被认为是正确"的工作方式.

Also I recommend using the delegate method of implementing this. Although not necessary for what you are doing you will find you will run into less problems later and is probably considered the "correct" way of doing things.