我有两个观点将其命名为具有纵向和横向上的旋转,我想切换views.But当负载它工作正常,但在旋转它不是working.please电话我来解决这个问题视图之间切换
-(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown)
{
self.view = self.portrait;
}
else
{
self.view = self.landscape;
}
}
你设置支持的接口方向? –
下次,请在此处放置代码时遵循正确的代码缩进指南。感谢您的时间。 –
@理查德·J·罗斯三亚我有 – crazy2431