iOS 15 added
UISheetPresentationController which allows you to implement a half-height sheet by setting
sheetPresentationController‘s detents to
[.medium()]. You can then set the
.medium to allow interacting with the presenting view controller and the sheet so you can achieve an interface similar to Maps and Stocks.
My question is, how could you detect when an undimmed sheet is presented and get its height in order to inset content in the underlying screen(s). For example, I want to add content insets to my table view so that you can scroll to see all cells. Currently, the sheet covers up the bottom cells making it impossible to interact with those – you can only tap the ones that lie above where the sheet rests.