Autolayout在iOS 7中调整完美但不在iOS中6
问题描述:
我在我的应用程序中有一个视图处于横向模式,并且已经在故事板中设置了upp UI,因此它会响应我想要的不同屏幕尺寸。现在,这个工程完全按照我想在iOS 7
但是当我在iOS 6
运行它的应用程序是像它不回应我的故事板设置:Autolayout在iOS 7中调整完美但不在iOS中6
我的应用主要是在肖像所以这
// CustomNavigationLandscapeViewController.m
- (BOOL)shouldAutorotate
{
return NO;
}
- (NSUInteger)supportedInterfaceOrientations
{
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
那么,有没有东西,我做错了获得此行为:鉴于该应用程序是在景观通过继承导航控制器设置?为什么它在iOS 7
中完美工作,但不在iOS 6
?
答
重新启动Xcode并彻底清除问题后即可解决。猜测这只是Xcode中的一个小故障,它出现在不适当的时间。
自动布局的确从iOS 6改变了一点到iOS 7.你是否也有iOS 6的约束错误? – footyapps27
@ footyapps27没有约束错误或任何东西,但干净,重启似乎解决了我的问题。 – Oskariagon