Make sure you Uncheck Autolayout in ViewController.xib, then this code always work. Change height to see different and comment out all setting in other method.
- (void)viewDidLayoutSubviews{
if (UIInterfaceOrientationIsLandscape(self.interfaceOrientation)){
toolbar1.frame = CGRectMake(0, 0, 1024, 20);
toolbar2.frame = CGRectMake(0, 374, 1024, 20);
} else {
toolbar1.frame = CGRectMake(0, 0, 768, 44);
toolbar2.frame = CGRectMake(0, 502, 768, 44);
}
}