Is it possible? Sure, but it violates the human interface guidelines.
Swift Version
import UIKit
class TabViewController: UITabBarController, UITabBarControllerDelegate {
override func viewDidLoad() {
super.viewDidLoad()
self.delegate = self
// Do any additional setup after loading the view.
}
override func viewWillLayoutSubviews() {
super.viewWillLayoutSubviews()
self.tabBar.invalidateIntrinsicContentSize()
var tabSize: CGFloat = 44.0
let orientation = UIApplication.sharedApplication().statusBarOrientation
if UIInterfaceOrientationIsLandscape(orientation)
{
tabSize = 32.0;
}
var tabFrame = self.tabBar.frame
tabFrame.size.height = tabSize
tabFrame.origin.y = self.view.frame.origin.y
self.tabBar.frame = tabFrame
self.tabBar.translucent = false
self.tabBar.translucent = true
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
// Get the new view controller using segue.destinationViewController.
// Pass the selected object to the new view controller.
}
*/
}