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

Warning when showing AlertView with textfield #327

Open
angelFrog opened this issue Oct 26, 2021 · 0 comments
Open

Warning when showing AlertView with textfield #327

angelFrog opened this issue Oct 26, 2021 · 0 comments

Comments

@angelFrog
Copy link

Hello,

I get this warning when showing an AlertView with a textfield:

[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.

The warning is triggered in AlertView.swift, createScrollViewConstraints() by self.scrollView.layoutIfNeeded()

I don't think I was getting this warning prior to iOS 15. The alert and textfield still work as expected. No other alerts receive this warning or hit the specified symbolic breakpoint.

Thanks!

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

1 participant