我的故事板大小和iPhone模拟器上实际显示的大小有问题.有任何想法吗?

我正在尝试找到一种方法来捕获从segue到根控制器的返回,这样我就可以运行自定义代码来决定下一步该做什么.我已经尝试了下面的两种方法,他们没有做到这一点,因为他们似乎(显然)关心展开segue堆栈.有什么想法吗?
-(UIStoryboardSegue *)segueForUnwindingToViewController
{
}
-(BOOL)canPerformUnwindSegueAction
{
}
Run Code Online (Sandbox Code Playgroud) 我遇到设备轮换问题.除了一个视图,我显示公司启动画面,我想将所有剩余的应用程序视图锁定到纵向显示.在项目设置中,支持的方向是Portrait和LandscapeLeft.在"公司飞溅"中它工作正常,无论我如何旋转设备,视图旋转都锁定在LandscapeLeft中.在我将设备向左旋转的所有其他视图中,视图会改变而不是保持纵向显示.这些方法甚至没有开火?如果我从项目中支持的方向中删除横向,则会拧紧"公司启动"视图.我尝试改变shouldAutorotate回归NO,但这没有帮助.试图通过这里发布的建议,但这没有帮助.如果我将以下代码放入我的AppDelegate.m,一切都被锁定为纵向模式,并且"公司启动"在访问时崩溃.
-(NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWindow:(UIWindow *)window
{
return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
}
Run Code Online (Sandbox Code Playgroud)
除了一个屏幕外,无论设备如何旋转,如何将视图锁定为纵向模式?
**来自'公司飞溅'视图的方法.再次,应该是这样的工作.
-(NSInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscapeLeft;
}
Run Code Online (Sandbox Code Playgroud)
**来自所有其他视图的方法,当我不希望它们旋转时,这些视图会旋转出来
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// IOS5 Only returning that it should rotate to potrait
return (interfaceOrientation == UIDeviceOrientationPortrait);
}
-(BOOL)shouldAutorotate
{
// forcing the rotate IOS6 Only
return YES;
}
-(NSInteger)supportedInterfaceOrientations
{
// return number or enum IOS6 Only
return UIInterfaceOrientationMaskPortrait;
}
Run Code Online (Sandbox Code Playgroud)
我想也许可能是因为UITabBarController是根控制器而我在ViewController中呢?这些方法甚至没有开火?