从已有View Controller下面展示新的View Controller

从已有View Controller上面展示新的View Controller

当前View上再展示一个新的View并与当前View进行交互,比如iPhone自带的日历:

从已有View Controller下面展示新的View Controller

其实现步骤为:

  1. 创建想要显示的View
  2. 设置modalTransitionStyle属性, 设置显示的动画内容
  3. 给将显示的View分配delegate
  4. 调用方法 presentViewController:animated:completion:显示新建的View
例如: 
    TestViewController *tvc = [[TestViewController alloc] init];
    tvc.delegate = self;
    tvc.modalTransitionStyle = UIModalTransitionStyleCoverVertical;
    [self presentViewController:tvc animated:YES completion:nil];