Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AbhishekApple

macrumors member
Original poster
Aug 5, 2010
86
0
I have set the navigation bar height to 100 but when i switch the orientation the height of the navigation bar resumes to 44.0???????????
Please suggest
(I need to set an image of height 100 on it...)
Code:
// Ensure that the view controller supports rotation and that the split view can therefore show in both portrait and landscape.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
	if (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
		CGRect navframe = [[self.navigationController navigationBar] frame];
		NSLog(@"Navframe=%f",navframe.size.height);//44.000;
		
		[[self.navigationController navigationBar] setFrame:CGRectMake(navframe.origin.x, navframe.origin.y, navframe.size.width, 100)];	
		NSLog(@"Navframechanged=%f",navframe.size.height);
	}
	else {
		CGRect navframe = [[self.navigationController navigationBar] frame];
		NSLog(@"Navframe=%f",navframe.size.height);//44.000;
		
		[[self.navigationController navigationBar] setFrame:CGRectMake(navframe.origin.x, navframe.origin.y, navframe.size.width, 100)];	
		NSLog(@"Navframechanged=%f",navframe.size.height);
		NSLog(@"Landscape");
	}
	
	

	return YES;
}
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.