what i want is suppose to be simple, instagram middle tab on IOS opens the app\'s camera interface but not like the rest of the tabs but as an independet view controller and
SWIFT 4 Code
After subclassing the Tabbarcontroller as specified by @erparker above, use this code
override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) {
if(item.tag==300){
if let viewController = UIStoryboard(name: "Main", bundle: nil).instantiateViewController(withIdentifier: "addNewTaskView") as? AddNewTaskViewController {
self.present(viewController, animated: true, completion: nil)
}
}
}
here, "Main" is the storyboard name which contains target view controller and "addNewTaskView" is the view controller storyboard Id given at the storyboard for a view controller.