SwiftPageMenu icon indicating copy to clipboard operation
SwiftPageMenu copied to clipboard

Strange behaviour when using TabBarController

Open tombai opened this issue 5 years ago • 0 comments

I have UITabBarController using a storyboard and add a PageTabMenuViewController. I populate items and titles in the init?(coder aDecoder: NSCoder).

It runs and works fine but with a warning "UITableView was told to layout its visible cells and other contents without being in the view hierarchy (the table view or one of its superviews has not been added to a window). "

The issue is that PageTabMenuViewController has no reference to the TabBarController so something like self.tabBarController!.tabBar will crash. It also causes its tab bar icon and label to disappear.

swiftpagemenu

tombai avatar Feb 14 '20 07:02 tombai