2012-02-15 2 views
1

私のストーリーボードではNavigation Controllerと一緒に作業していますが、シミュレータを横置きにすると、アプリケーションは常にポートレート形式になります。どうして? =([iPhone]

答えて

1

変更

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    return (interfaceOrientation == UIInterfaceOrientationPortrait); 
} 

また
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown); 
} 

プロジェクト設定で確認するために、あなたは風景を許可するように設定 'デバイスの向きサポート' をしている。

+0

が動作しない!:( – GeraldoBastos

+0

@GeraldoBastos設定でランドスケープが有効になっていますか?上記は、デバイスが任意の位置に回転するといつでもトリガーされます。肖像画を上下逆さまにする。 – Bot

+0

はい!しかし、仕事はありません。 – GeraldoBastos