I have a view which is added in the form: [currentView addSubview: viewController.view];
If the view was added like [self presentModalViewController: viewController] then the view is displayed always ok, from landscape and portrait mode.
However, I can’t use modal because the view needs to have transparent background and modal converts it to black.
The problem using the first method is that the nib is alway loaded in portrait mode, if the current orientation is portrait everything loads ok, and I can rotate to landscape without problem.
When my device is in landscape mode, the view is loaded as portrait again so it doesn’t fit ok in screen.
I tried calling the rotation delegate methods: didRotateWithOrientation, willRotateWithOrientation, willAnimateRotation .. etc., however they don’t rotate my view.
Is there any way to load the nib in a specific orientation or to rotate the view before it is added to my other view?
Unfortunately I don’t think that this is possible, at least in iOS 4.
Check out this answer:
https://stackoverflow.com/a/4869207/472344
You might better off creating a custom view and adding that instead of a view controller.