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的更多相关文章

  1. 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 ...

  2. 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- ...

  3. 从Cell的视图推出一个新的界面

    先写一个方法, 强制增加一个navigation的属性. 这样self就可以调出来navigation了 - (UINavigationController*)naviController { for ...

  4. Start Developing iOS Apps Today

    view types - view常见类型

  5. UINavigationController出现nested push animation can result in corrupted navigation bar的错误提示

    今天在測试过程中,出现了这样一个bug.分别有两种情景: (前提是:app是基于UINavigationController构建的) 1.从Controller-A中push进来B.在B中点击返回,返 ...

  6. [Angular HTML] Implementing The Input Mask Cursor Navigation Functionality -- setSelectionRange

    @HostListener('keydown', ['$event', '$event.keyCode']) onKeyDown($event: KeyboardEvent, keyCode) { i ...

  7. iOS Programming UINavigationController

    iOS Programming UINavigationController the Settings application has multiple related screens of info ...

  8. iOS第八课——Navigation Controller和Tab bar Controller

    今天我们要学习Navigation Controller和Tab bar Controller. Navigation Controller是iOS编程中比较常用的一种容器,用来管理多个视图控制器. ...

  9. navigation controller

    一.程序框架 1.程序结构

随机推荐

  1. javascript最容易混淆的作用域、提升、闭包

    一.函数作用域 1.函数作用域 就是作用域在一个“Function”里,属于这个函数的全部变量都可以在整个函数的范围内使用及复用. function foo(a) { var b = 2; funct ...

  2. supervisor的配置

    看了下文档,比较多.http://www.supervisord.org/ 抱着试试又不会怀孕的心态,trying,碰了几鼻子灰,记录如下, 方便大家 1. 安装 easy_install super ...

  3. jquery学习——遍历

    1.each() $(selector).each(function(index,element)) var arr = [ "a", "bb", " ...

  4. 普元部署多个应用的方法(适用EOS6.5以上版本,且无需governor中添加应用)

    在EOS下跑default项目之外的另外一个项目,比如defaultNew 步骤1 安装EOS6.5,安装路径如下:E:\program\eos: 启动EOS Eos默认的应用名称为Default 步 ...

  5. 【Docker】docker /var/lib/docker/aufs/mnt 目录满了,全是垃圾数据,咋搞?

    命令: #!/bin/bash # 推荐方式 docker volume ls -f dangling=true | awk '{ print $2 }' | xargs docker volume ...

  6. Rubix - ReactJS Powered Admin Template 后台管理框架

    Rubix - ReactJS Powered Admin Template  后台管理框架,使用 ReactJS. http://rubix400.sketchpixy.com/ltr/charts ...

  7. SQL Server 流程控制

    流程控制语句: BEGIN ... END WAITFOR GOTO WHILE IF ... ELSE BREAK RETURN CONTINURE   1.BEGIN ... END BEGIN ...

  8. 9.SpringMVC和json结合传递数据 && 10.SpringMVC获取controller中json的数据

  9. SqlDateTime 溢出。

    SqlDateTime 溢出.必须介于 1/1/1753 12:00:00 AM 和 12/31/9999 11:59:59 PM 之间 解决方法:不要怀疑自己的判断就是数据库字段里的datatime ...

  10. xdebug安装

    sudo apt-get install php-pearsudo apt-get install php5-devsudo pecl install xdebug 下载安装编译完后,在php.ini ...