shouldAutorotateToInterfaceOrientation
メソッドでビューをロードしようとしていますが、問題があります。デバイスがランドスケープとして実行されているときは、メインビュー自体を表示し、デバイスがポートレートのときはカスタムUIViewをロードします。mainViewをshouldAutorotateToInterfaceOrientationでロードする
は、ここに私のコードです:私は考え出し
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
// Return YES for supported orientations
if ((interfaceOrientation == UIInterfaceOrientationLandscapeLeft)|| (interfaceOrientation == UIInterfaceOrientationLandscapeRight))
//doesn't show main view !!
self.view;
else if ((interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown))
//works fine !
self.view = portraitView;
return YES;
}
私は考え出した!!!!私は方法についてモーダルで私の意見を呼ぶ。 – Momi