Closed escully27 closed 7 years ago
@escully27 Hi, Can you please show me how are you initializing the controller that has the table view, and how are you adding it to the tab bar controller?
func filter(_ sender: Any) { let filter = self.storyboard?.instantiateViewController(withIdentifier: "feedFilter") as! feedFilter filter.view.frame = CGRect(x: 0, y: (0-self.view.frame.height)+280, width: self.view.frame.width, height: self.view.frame.height) filter.view.tag = 33 if let jw = currentTabBar?.parent { self.view.addSubview(filter.view) } }
@escully27 So let me get this, You have a tab bar which holds x tabs, and in one of those tabs you have a selector function, that when called, it adds a view controller into that view controller.
So the current hierarchy is like this:
Well I don't think this has anything to do with the tab bar. Few things you might be missing is to add a child view controller to the Tab Bar Child View Controller, so that the Table View Controller is a child of it. I would also recommend adding constraints/auto resizing masks.
Yes, you've got the layout correctly. I will continue to play with and let you know. Feel free to close for now, cheers
Hey! Me again :)
On one of the main views of the tabBarController, I am trying to instantiate another VC, add it as a subview, and animate it down onto the screen. This part is working fine, but when I scroll/tap or otherwise interact with this tableview (as a subview) its content disappears!
Let me know if this makes sense, otherwise I can inspect my code further. I've done this same thing many times and it works when not a descendant of the tabBarController.
Thanks again!!