I am making subView on the main view it works fine but problem is that when i add any thing in it it takes portrait bounds though my app is landscape mode i want in landscape mode.
here is my code
backgroundViewBounds= [[UIScreen mainScreen] bounds];
backgroundView = [[UIView alloc]initWithFrame:backgroundViewBounds];
[self.view.window addSubview:backgroundView] ;
CGRect subViewBounds = CGRectMake(0,0,1100,1100) ;
subView=[[UIView alloc]initWithFrame:subViewBounds];
subView.backgroundColor=[UIColor colorWithPatternImage:[UIImage imageNamed:@"bgPopupback"]];
[backgroundView addSubview:subView] ;
UIImageView*popImageView=[[UIImageView alloc] initWithFrame:CGRectMake(600,745,165,108)];
popImageView.image=[UIImage imageNamed:@"popup3.png"];
[popImageView setTransform:CGAffineTransformMakeRotation(-M_PI / 2)];
[subView addSubview:popImageView];
I have searched for this but did not get any working some say use in veiwWillappear but not working with me.