Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UITableView Layout issue #151

Open
mankarth004 opened this issue Sep 23, 2020 · 1 comment
Open

UITableView Layout issue #151

mankarth004 opened this issue Sep 23, 2020 · 1 comment

Comments

@mankarth004
Copy link

Hi, first of all, thanks for the beautiful library.
I have an app that has a menu as a left drawer and other as regular screens so that I used your library. It is working as expected. The problem is it is throwing an exception regarding the layout of UITableView only once per when app is run. The exception is this.

[TableView] Warning once only: 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). This may cause bugs by forcing views inside the table view to load and perform layout without accurate information (e.g. table view bounds, trait collection, layout margins, safe area insets, etc), and will also cause unnecessary performance overhead due to extra layout passes. Make a symbolic breakpoint at UITableViewAlertForLayoutOutsideViewHierarchy to catch this in the debugger and see what caused this to occur, so you can avoid this action altogether if possible, or defer it until the table view has been added to a window. Table view: <UITableView: 0x7ff62983c400; frame = (0 0; 280 783); clipsToBounds = YES; autoresize = RM+BM; gestureRecognizers = <NSArray: 0x6000008368b0>; layer = <CALayer: 0x600000638260>; contentOffset: {0, 0}; contentSize: {280, 500}; adjustedContentInset: {0, 0, 0, 0}; dataSource: <AppName.MenuViewController: 0x7ff627c2ab60>>

I know it doesn't cause any critical issues but I just don't want to see that warning. Please have a look at this issue.

@Z1napp
Copy link

Z1napp commented Aug 16, 2021

Hello, @mankarth004, I have the same issue.

For my project it's really critical issue. I have UI freezing at first time, when I'm trying to open controller.
I tried to create symbolic breakpoint with symbol: "UITableViewAlertForLayoutOutsideViewHierarchy" and found a place, where problem is located.
In my case it's occurs in KYDrawerController at 239 line (_containerView.layoutIfNeeded()).
The reason why it's happened - that layoutIfNeeded calls too early.

I would like to ask someone to participate with solving inside library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants