Yes, it's not a good idea but can be a solution to your problem.
Follow this steps:
Enable 'Safe Area Layout'
Create/add a view (i.e. name it bottomPaddingView) (Programtically or using storyboard) with background color, same as your sheet color.
Position it (using following constraints - following constraints are not a code structure, but just showing a constraint/anchor relationship)
- bottomPaddingView.bottom = self.view.bottom
- bottomPaddingView.trailing = self.view.trailing
- bottomPaddingView.leading = self.view.leading
- bottomPaddingView.top = self.view.safeAreaLayoutConstraint.bottom // If you've enabled 'Safe Area Layout'
- or bottomPaddingView.top = self.view.bottomLayoutguide // If you've not enabled 'Safe Area Layout'
Now hide/unhide your bottomPaddingView with respect to actionship visibility with fade animation.
Here is my tiny extension. If anybody can suggest an improvement to not access added view by "magic number" tag - welcome!
}
Yes, it's not a good idea but can be a solution to your problem.
Follow this steps:
- bottomPaddingView.bottom = self.view.bottom
- bottomPaddingView.trailing = self.view.trailing
- bottomPaddingView.leading = self.view.leading
- bottomPaddingView.top = self.view.safeAreaLayoutConstraint.bottom // If you've enabled 'Safe Area Layout'
- or bottomPaddingView.top = self.view.bottomLayoutguide // If you've not enabled 'Safe Area Layout'
Now hide/unhide your
bottomPaddingView
with respect to actionship visibility with fade animation.