let tabSubView = UIView(frame: CGRectMake( 0, //statusView.frame.height + ownedSchoolCoinBgView.frame.height + tabbgView.frame.height, 0, self.view.frame.width, self.view.bounds.size.height – ownedSchoolCoinBgView.frame.origin.y ))print(“tabSubView.frame=\(tabSubView.frame)”) let recordTabBarView = UITabBarController() recordTabBarView.viewControllers = tabControllers //self.addChildViewController(recordTabBarView) self.view.addSubview(tabSubView) |
recordTabBarView.viewControllers = tabControllers recordTabBarView.selectedIndex = 2 var tabFrame:CGRect = recordTabBarView.tabBar.frame //self.addChildViewController(recordTabBarView) tabSubView.addSubview(recordTabBarView.view) |
var tabFrame:CGRect = recordTabBarView.tabBar.frame print(“origin tabFrame=\(tabFrame)”) tabFrame.size.height -= 60 tabFrame.origin.y -= 20 recordTabBarView.tabBar.frame= tabFrame print(“new tabFrame=\(recordTabBarView.tabBar.frame)”) |
recordTabBarView.transitionCoordinator()?.containerView().frame.height = 60 |
var tabFrame:CGRect = recordTabBarView.tabBar.frame print(“origin tabFrame=\(tabFrame)”) tabFrame.size.height -= 60 tabFrame.origin.y -= 20 recordTabBarView.tabBar.frame = tabFrame print(“new1 tabFrame=\(recordTabBarView.tabBar.frame)”) //recordTabBarView.transitionCoordinator()?.containerView().frame.height = 60 print(“new2 tabFrame=\(recordTabBarView.tabBar.frame)”) |
tabSubView.frame=(0.0, 0.0, 375.0, 603.0) origin tabFrame=(0.0, 618.0, 375.0, 49.0) new1 tabFrame=(0.0, 587.0, 375.0, 11.0) new2 tabFrame=(0.0, 0.0, 375.0, 603.0) |