iPhone and iPad devices do not rotate views with TAB bar controller

Question: I have another quickie. I am building an iPhone app with TAB navigation. I created my own custom UIViewControllers which have an UIView and an UITableView as it’s subviews. When device’s orientation changes, my views, including the ADBannerView, do not follow it. Neither iPhone nor iPad devices rotate my views. I am attaching my code. Answer: The quick answer is that you do not return the same values in shouldAutorotateToInterfaceOrientation in your root UIViewControllers. At the first view controller you correctly return YES:
(BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation)interfaceOrientation {
    return YES;
}
It is not enough to return YES (at the supported orientations) in the first view controller. Return the same in all of your root view controllers. “Tab bar controllers support a portrait orientation by default and do not rotate to a landscape orientation unless all of the root view controllers support such an orientation.” That’s it. Notes: You are inserting and removing ADBannerView in a subview hierarchy. Be sure that your table view resizes and the banner view repositions itself correctly during orientation changes. Otherwise you likely never see the Ad Banner and gets an ADBannerView warning in the Xcode: “A banner view (0xxxxxxx) has an ad but may be obscured. This message is only printed once per banner view.” When you get this message, something is likely covering the banner view.