选项卡控制器
首先需要创建两个视图
class FirstSubViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.title="111111111"
self.tabBarItem.image=UIImage(named: "Tab")
self.view.backgroundColor=UIColor.brown;
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}
class SecondSubViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
self.view.backgroundColor=UIColor.purple;
self.title="222222"
self.tabBarIte