ermalkaleci / CarbonKit

CarbonKit - iOS Components (Obj-C & Swift)
MIT License
682 stars 164 forks source link

XCode 11 Crash with CarbonKit + UITableView (returned nil from -traitCollection) #239

Closed iDevid closed 4 years ago

iDevid commented 4 years ago

Hello actually we have a crash on all our sections that contains CarbonKit + ChildControllers with tableview inside, when builded on XCode 11 GM 2

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '<ChildController: 0x13df12590> returned nil from -traitCollection, which is not allowed.

iDevid commented 4 years ago

We discovered that this is a bug of ChildViewController. Usually we set in the viewDidLoad the tableFooterView to UIView() to hide empty rows. With Xcode 11 when you do this the app will crash with the previous error.

The current temporary solution is to move that to viewDidLayoutSubviews.