以编程方式在iOS中创建UINavigationController [英] Programmatically creating UINavigationController in iOS

查看:103
本文介绍了以编程方式在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

这篇关于以编程方式在iOS中创建UINavigationController的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆