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) |
import UIKit class AllRecordTabViewController: UIViewController { override func viewDidLoad() { view.backgroundColor = UIColor.greenColor() } |
import UIKit class IncomeRecordTabViewController: UIViewController { override func viewDidLoad() { view.backgroundColor = UIColor.yellowColor() } } |
import UIKit class ExpenseRecordTabViewController: UIViewController { override func viewDidLoad() { view.backgroundColor = UIColor.cyanColor() } } |
转载请注明:在路上 » [未解决]swift实现在特定一块矩形区域内添加tab按钮页面