set frame when i enter to search bar in landscape mode
<p>In my app,i am using the search bar just below the navigation bar on my view controller.For searching so usng the searchDisplay controller.When i click or tap on search bar my navigation bar is just disapper an at the place of navigation bar my search bar come up.And my table view just come up slightly.
This thing is using in the method " searchDisplayControllerWillBeginSearch"  like:</p>

<pre><code>(void) searchDisplayControllerWillBeginSearch:(UISearchDisplayController *)controller{
NSLog(@"enter query");
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationBeginsFromCurrentState:YES];
[UIView setAnimationDuration:0.3];
if(UI_USER_INTERFACE_IDIOM()==UIUserInterfaceIdiomPad)
{

    [navBarAvtarBani setFrame:CGRectMake(0,-44,768, 44)];
    [contentsTbView setFrame:CGRectMake(0, 0, 768, 960)];
}   
else {

[navBarAvtarBani setFrame:CGRectMake(0, -44, 320, 44)]; 
[contentsTbView setFrame:CGRectMake(0, 0, 320, 416)];
}
[UIView commitAnimations];

}
</code></pre>

<p>The contentsTbView is my table view.The three things table view,nav bar,and the search bar are interacted with the interface builder.</p>

<p>The proble is that this will fine works in portrait mode.But launch the app and just i rotate and click on search bar.my nav bar shifted up.But my search bar frame is like that in portrait i.e. its width is 768 not it is 1004.
I have used the should auto rotate ,will rotate,uidevice notification and did rotate method...But these method calls first and after it " searchDisplayControllerWillBeginSearch" called.Is there any rotation method that we call under the searchdisplaycontrollerwillbeginsearch method. </p>
