以编程方式在iOS中创建UINavigationController

以编程方式在iOS中创建UINavigationController

问题描述:

我是iOS新手。我想在我的应用程序中使用导航控制器,但我不知道该怎么做。因此,任何人都可以一步一步地指导我在我的应用程序中创建导航。

I am new to iOS. And I want to use navigation controller in my application but I have no any idea how to do it. So can any one guide me step by step for creating navigation in my application.

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
ImageViewController2 *dealVC = (ImageViewController2 *)[storyboard instantiateViewControllerWithIdentifier:@"ImageViewController2"];
[self.navigationController pushViewController:dealVC animated:YES];

其中ImageViewController2是类名

where ImageViewController2 is a class name