How to navigation to previous page!
如何导航到上一页!
I add navigation controller to appDelegate so thought out the application i do have navigation controller.
我将导航控制器添加到appDelegate,所以考虑了我有导航控制器的应用程序。
I hidden navigation Bar and added HeaderView on the top.
我隐藏了导航栏并在顶部添加了HeaderView。
// Hidden NavigationBar
//隐藏的NavigationBar
- (void) viewWillAppear:(BOOL)animated
{
[self.navigationController setNavigationBarHidden:YES animated:animated];
[super viewWillAppear:animated];
}
Now customize my header bar with UIView! I hidden navigation Bar and added HeaderView on the top.
现在用UIView自定义我的标题栏!我隐藏了导航栏并在顶部添加了HeaderView。
Now i added BackButton to the header Bar. Now i want to navigation pervious page. Can any one suggest me?
现在我将BackButton添加到标题栏中。现在我想导航上一页。任何人都可以建议我吗?
@Thanks In Advance.
@提前致谢。
3 个解决方案
#1
3
if the view is called by a push action, call :
如果通过推送操作调用视图,请调用:
[self.navigationController popViewControllerAnimated:YES];
else if the view is displaying by a modal call :
否则,如果视图通过模态调用显示:
[self dismissModalViewControllerAnimated:YES];
#2
3
Use [self.navigationController popviewControllerAnimated :YES];
#3
0
Use this when the user taps the Back button:
当用户点击“后退”按钮时使用此选项:
[self popViewControllerAnimated:YES];
#1
3
if the view is called by a push action, call :
如果通过推送操作调用视图,请调用:
[self.navigationController popViewControllerAnimated:YES];
else if the view is displaying by a modal call :
否则,如果视图通过模态调用显示:
[self dismissModalViewControllerAnimated:YES];
#2
3
Use [self.navigationController popviewControllerAnimated :YES];
#3
0
Use this when the user taps the Back button:
当用户点击“后退”按钮时使用此选项:
[self popViewControllerAnimated:YES];