eggswift / ESTabBarController

:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie!
MIT License
5.17k stars 578 forks source link

ESTabBarController doesn't support storyboard!!! #45

Closed qasimsina closed 7 years ago

qasimsina commented 7 years ago

Hi I use this library and work good! but when i add view in tabbar controller, nothing action work in view!

let splashVC = self.storyboard!.instantiateViewController(withIdentifier: "Splash")

        let tabBarController = ESTabBarController()
        tabBarController.delegate = self
        tabBarController.title = "Irregularity"
        tabBarController.tabBar.shadowImage = UIImage(named: "transparent")
        tabBarController.tabBar.backgroundImage = UIImage(named: "background_dark")

        let v1 = DashboardViewController()
        let v2 = FollowViewController()
        let v3 = BuyViewController()
        let v4 = MessageViewController()
        let v5 = PurchaseRecordsViewController()

        v1.tabBarItem = ESTabBarItem.init(ExampleIrregularityBasicContentView(), title: "Dashboard", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1"))
        v2.tabBarItem = ESTabBarItem.init(ExampleIrregularityBasicContentView(), title: "Follow", image: UIImage(named: "find"), selectedImage: UIImage(named: "find_1"))
        v3.tabBarItem = ESTabBarItem.init(ExampleIrregularityContentView(), title: nil, image: UIImage(named: "shop"), selectedImage: UIImage(named: "shop_1"))
        v4.tabBarItem = ESTabBarItem.init(ExampleIrregularityBasicContentView(), title: "Messagage", image: UIImage(named: "favor"), selectedImage: UIImage(named: "favor_1"))
        v5.tabBarItem = ESTabBarItem.init(ExampleIrregularityBasicContentView(), title: "Purchase Records", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1"))

        tabBarController.viewControllers = [v1, v2, v3, v4, v5]

        let navigationController = MainNavigationController.init(rootViewController: tabBarController)
        tabBarController.title = "Test"

        self.present(navigationController, animated: true, completion: nil)

        UIApplication.shared.keyWindow?.addSubview(splashVC.view)

after this code. in SplashViewController no action will not work!!!

eggswift commented 7 years ago

Sorry don't support storyboard now!