私のアプリはナビゲーションコントローラーを使用しており、ランドスケープサポートを挿入しようとしています! 次のコードで IBAction (UIButton に接続) で呼び出される NavigationController とビューがあります。
view *myview = [[view alloc] initWithNibName:@"view" bundle:[NSBundle mainBundle]];
[self pushViewController:myview animated:YES];
もちろん、NavigationController_Class に「myview.h」をインポートしました
したがって、ランドスケープのために、このコードを「myview.m」と「NavigationController_Class.m」に挿入しました
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
return ((interfaceOrientation == UIInterfaceOrientationPortrait) || (interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) || (interfaceOrientation == UIInterfaceOrientationLandscapeLeft) || (interfaceOrientation == UIInterfaceOrientationLandscapeRight));
}
どうしたの?動作しますが、スタックからビューをポップするボタンをタッチすると、これは右から左ではなく、上から下にスクロールします!
何が問題になるか知っていますか?ありがとう!