How to add one extra button on TabBar without a view controller because i want to handling that button click form following method ...
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem)
{
if (tabBar.items?.firstIndex(of: item))! == 3{
//button click do some thing on existing view
}
}
i already add three buttons with ViewControllers with following code
let VC = UIStoryboard.init(name: "Main", bundle:
Bundle.main).instantiateViewController(identifier: VCidentifier)
VC.tabBarItem.image = UIImage(named: selectedImage)
VC.tabBarItem.selectedImage = UIImage(named: unSelectedImage)
and then add these ViewControllers to this
viewControllers = [firstVC,secoundVC,thirdVC,fourthVC]
but i want to add forth button without a view controller ...