On the initial view of my app I want the interface to be portrait only but on the view controllers after that it can be any orientation. I tried this code to lock it but it doesn't work and the view can still rotate:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}