Post #1861689
2026-02-04 09:49 UTC
Trying to fix a bug which seems to be caused by this combination of factors:
* I’m presenting a `UIViewController` in a SwiftUI sheet using `UIViewControllerRepresentable`
* To get a navbar, the `UIViewControllerRepresentable` wraps the view controller in a UINavigationController
* The view controller has a `UITableView` with `contentInsetAdjustmentBehavior = .automatic`
The view looks correct when presented, but taps are offset by the height of the safe area, which is… not ideal.
Replies (1)
-
@vrutberg@masto.nu 2026-02-04 09:51
Setting `contentInsetAdjustmentBehavior = .never` fixes the tap issue, but it also puts the table view content under the top safe area (under the navbar). So now I’m looking into implementing this manually instead. Sigh!