我有兩個觀點將其命名爲具有縱向和橫向上的旋轉,我想切換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