I have a storyboard with tabbarcontroller. One of tab bar has a tableview and I want that when the user tap in a row from tableview open a detail view with another tabbar. The problem is when I open detail view tab bar hides . how to show tabbar at didselectrowatindexpath?
The code in didselectrowatindexpath:
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let storybaord=UIStoryboard(name: "Main", bundle: nil)
let DVC=storybaord.instantiateViewController(withIdentifier: "NewsViewController") as! NewsViewController
DVC.getImage=sneaker[indexPath.row]
DVC.getNews=News[indexPath.row]
self.navigationController?.pushViewController(DVC, animated: true)
}
I have created single view application.I have created DiscoveryNewsTableViewCell.I populated the table view cell with two arrays 1-sneaker 2- News array .I want when the particular array displayed ist tab of bar controller .But i did get these fields on first tab of tabbar controller .Here is the sample code for this https://drive.google.com/file/d/1uSYl-4a1UQXpMXkSQ_l8aij6EH_v2yna/view?usp=sharing