Implementing Navigation with UINavigationController
Implementing Navigation with UINavigationController
Problem
You would like to allow your users to move from one view controller to the other with a smooth and built-in animation.
Solution
Use an instance of UINavigationController.
#import "AppDelegate.h" #import "FirstViewController.h" @interface AppDelegate () @property (nonatomic, strong) UINavigationController *navigationController; @end @implementation AppDelegate ...
- (BOOL) application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ FirstViewController *viewController = [[FirstViewController alloc] initWithNibName:nil bundle:nil]; self.navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; self.window.rootViewController = self.navigationController; self.window.backgroundColor = [UIColor whiteColor]; [self.window makeKeyAndVisible]; return YES; }
如下图所示,我们得到了一个能够跳转的view.
这个是详情页面
Implementing Navigation with UINavigationController的更多相关文章
- IOS 7 Study - Implementing Navigation with UINavigationController
ProblemYou would like to allow your users to move from one view controller to the other witha smooth ...
- 1: 介绍Prism5.0 Introduction to the Prism Library 5.0 for WPF(英汉对照版)
Prism provides guidance designed to help you more easily design and build rich, flexible, and easy- ...
- 从Cell的视图推出一个新的界面
先写一个方法, 强制增加一个navigation的属性. 这样self就可以调出来navigation了 - (UINavigationController*)naviController { for ...
- Start Developing iOS Apps Today
view types - view常见类型
- UINavigationController出现nested push animation can result in corrupted navigation bar的错误提示
今天在測试过程中,出现了这样一个bug.分别有两种情景: (前提是:app是基于UINavigationController构建的) 1.从Controller-A中push进来B.在B中点击返回,返 ...
- [Angular HTML] Implementing The Input Mask Cursor Navigation Functionality -- setSelectionRange
@HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { i ...
- iOS Programming UINavigationController
iOS Programming UINavigationController the Settings application has multiple related screens of info ...
- iOS第八课——Navigation Controller和Tab bar Controller
今天我们要学习Navigation Controller和Tab bar Controller. Navigation Controller是iOS编程中比较常用的一种容器,用来管理多个视图控制器. ...
- navigation controller
一.程序框架 1.程序结构
随机推荐
- 修改vb程序图标
1. 2.
- Maven 实用命令和技巧
1.Jar冲突排查 maven dependency:tree 人工排除
- NFV技术中遇到的新名词
NUMA topology:Non-Uniform Memory Access (NUMA) is a computer system architecture that is used with m ...
- 【GoLang】golang底层数据类型实现原理
虽然golang是用C实现的,并且被称为下一代的C语言,但是golang跟C的差别还是很大的.它定义了一套很丰富的数据类型及数据结构,这些类型和结构或者是直接映射为C的数据类型,或者是用C struc ...
- 【MySQL】MySQL server has gone away 怎么处理?
直接上代码: from django.db import connection ... def is_connection_usable(): try: connection.connection.p ...
- 【leetcode】Maximum Subarray
Maximum Subarray Find the contiguous subarray within an array (containing at least one number) which ...
- 基于Hadoop 2.6.0运行数字排序的计算
上个博客写了Hadoop2.6.0的环境部署,下面写一个简单的基于数字排序的小程序,真正实现分布式的计算,原理就是对多个文件中的数字进行排序,每个文件中每个数字占一行,排序原理是按行读取后分块进行排序 ...
- ORACLE、MYSQL的JDBC配置
info.jdbc.driverClassName=oracle.jdbc.driver.OracleDriver info.jdbc.url=jdbc:oracle:thin:@192.168.18 ...
- LeetCode 459 Repeated Substring Pattern
Problem: Given a non-empty string check if it can be constructed by taking a substring of it and app ...
- Java抽象类接口、内部类题库
一. 选择题 1. Person类和Test类的代码如下所示,则代码中的错误语句是( C ).(选择一项) public class Person { public String nam ...