Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Dec 20, 2010, 04:12 AM   #1
AbhishekApple
macrumors member
 
Join Date: Aug 2010
NavigationBar height Changes to original height (44.0) as orientation changes!!!

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;
}
AbhishekApple is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
How Long To Download matthew12 Mac OS X 10.7 Lion 2 Nov 30, 2011 05:27 AM
3GS 5.0.1 OTA update produces DFU mode Wolffie iOS 5 and earlier 1 Nov 12, 2011 11:42 AM
Would you like to see this? EdChambo Mac Applications and Mac App Store 10 Jan 14, 2011 02:44 PM
Download Redsn0w 0.9.7 beta 4 (released before an hour) askfranklin Jailbreaks and iOS Hacks 17 Jan 1, 2011 07:53 AM
Videochat problem windows messenger 8.0 (build 100825) divine2 Mac Applications and Mac App Store 0 Nov 22, 2010 07:06 AM


All times are GMT -5. The time now is 11:49 PM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

Privacy / DMCA contact / Affiliate and FTC Disclosure
Copyright 2002-2013, MacRumors.com, LLC