2

I have a navigation large title and a table view, it all works fine, when I scroll the table view, the large title was still collapsing.

But after I add a image behind the table view, it's not collapsing anymore.

I found the answer here that says it will not work if there's a subview under the SafeArea other than UITableView, but if that's the case, how can i add a background image behind the UITableView?

Disclaimer: I have this code because I want my image to move up when the large title collapse

backgroundImageTopConstraint.constant = backgroundImageTopConstraint.constant - (self.navigationController?.navigationBar.frame.size.height)!
Dylan
  • 1,121
  • 1
  • 13
  • 28
  • Every `UITableView` comes with a `backgroundView` where the default value is `nil`. https://developer.apple.com/documentation/uikit/uitableview/1614986-backgroundview. Can you try to add your image view as the `backgroundView` of the the table view you have? – Sauvik Dolui Sep 03 '20 at 16:55
  • @SauvikDolui but I need to constraint it to the safe area – Dylan Sep 04 '20 at 02:42

0 Answers0