I am having this strange problem . in the app delegate m doing this CGRect screenBounds = [[UIScreen mainScreen] bounds];
m_window = [[UIWindow alloc] initWithFrame: screenBounds];
m_view = [[GLView alloc] initWithFrame: screenBounds];
[m_window addSubview: m_view];
viewController=[[rcuivewcontroller alloc] initWithNibName:Nil bundle:Nil];
[m_view addSubview:viewController.view];
[m_window makeKeyAndVisible];
where m_view is object of an UIView class and viewController is an object of UIViewController class. Ihad set the UIviewController orientation to Landscaperight by returning true for landscape orientation in shouldAutorotateToInterfaceOrientation() method of uiviewController .
Next i added the uiviewController's view to uiview . The issue is when i add another subview which is basically a adwhirlview object (adview) to UIViewController's view it comes in portrait mode . I dont know whats going wrong ...
I observed these 2 important points :
- When i perform touch event on adview and close the ad-window the adview comes in orientation mode which i want from the beginning.
- The m_view which is basically a UIView is displaying its subviews in portrait mode which cant be changed .