Sle*_*lee 38 cocoa-touch objective-c uinavigationcontroller
有没有办法在堆栈中返回一个视图UINavigationController?或者具有特定标题的视图?
Mat*_*ong 92
我不是故意粗鲁,但这确实是有据可查的.在UINavigationController上进行谷歌搜索甚至是Apple文档搜索都会满足您的需求.要以编程方式弹出当前视图控制器,请使用:
[[self navigationController] popViewControllerAnimated:YES];
Run Code Online (Sandbox Code Playgroud)
要弹出到特定视图控制器,请使用:
[[self navigationController] popToViewController:controller animated:YES];
Run Code Online (Sandbox Code Playgroud)
您必须首先遍历视图控制器列表,然后根据您要查找的内容检查标题,并将其传递给此方法.
看看popViewControllerAnimated:.
从文档: This method removes the top view controller from the stack and makes the new top of the stack the active view controller.
用法类似于:
[aViewController popViewControllerAnimated:YES];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
20522 次 |
| 最近记录: |