简体   繁体   English

两个UIView控制器-更改View控制器-触摸Second View Controller的顶部将变回第一个View Controller

[英]Two UIView Controllers - changing View controllers - touching top of Second View Controller changes back to first view controller

I have a storyboard with two UIVIewControllers. 我有一个带有两个UIVIewControllers的情节提要。 They both have ID's set and when "Start Game" is pressed: 它们都设置了ID,并且在按下“开始游戏”时:

-(IBAction)startGame:(id)sender{
    [self startGameProcedure];
    UIViewController *gameController = [self.storyboard instantiateViewControllerWithIdentifier:@"second"];
    [self presentViewController:gameController animated:YES completion:nil];
}

This loads the second view controller. 这将加载第二个视图控制器。 But when the user touches anywhere in the top half of this view controller, it goes back to the first view controller? 但是,当用户触摸此视图控制器上半部分的任何位置时,它又回到第一个视图控制器吗? I don't want this to happen. 我不希望这种情况发生。 What have I done incorrectly and how can I resolve this please? 我做错了什么,请问如何解决?

This was due to the transition style being "Partial Curl". 这是由于过渡样式为“部分卷曲”。 Changing this resolved the issue. 更改此设置即可解决问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在模态视图控制器后面更改视图控制器 - Changing View Controllers Behind a Modal View Controller 使用两个Nav控制器推送视图控制器 - Pushing View Controller with Two Nav Controllers 将旋转时的视图控制器更改为单个公共视图控制器目标c - Changing view controllers on rotation to a single common view controller objective c 更改根视图控制器不会取消分配同一窗口上的先前视图控制器 - Changing the root view controller is not deallocating the previous view controllers on the same window Swift:在XLPagerTabStrip中使用子视图控制器后,如何选择回到第一个视图控制器 - Swift: How to segue back to first view controller after using child view controllers from the XLPagerTabStrip 一个视图控制器内有两个视图控制器,管理框架属性 - Two view controllers inside one view controller, managing the frame property 使用View Controller管理其他两个View Controller - Using a View Controller managing two other View Controllers 关闭两个View Controller,然后推送一个View Controller-Swift - Dismiss Two View Controllers and then Push a View Controller - Swift 无法将第二个视图控制器嵌入第一个视图控制器之上 - Unable to embed second view controller on top of first view controller 如何在TabBarContoller的两个视图控制器之间传递数据,其中第一个视图控制器是TableViewController - How to pass data between two view controllers of a TabBarContoller where the first view controller is a TableViewController
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM