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...)
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;
}