私のアプリの最初のビューでは、インターフェイスを縦向きのみにしたいのですが、その後のView Controllerでは任意の向きにすることができます。私はそれをロックするためにこのコードを試しましたが、それは機能せず、ビューはまだ回転できます:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}