sberrevoets / SDCAlertView

The little alert that could
MIT License
1.86k stars 298 forks source link

Warning when showing AlertView with textfield #327

Open angelFrog opened 3 years ago

angelFrog commented 3 years ago

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!