Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove safe area #63

Closed
flowbe opened this issue Jun 8, 2022 · 2 comments
Closed

Remove safe area #63

flowbe opened this issue Jun 8, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@flowbe
Copy link

flowbe commented Jun 8, 2022

I created a bottom sheet with scrollable content and a white background. The bottom sheet content has a safe area inset bottom that is not very beautiful. The only way I found to remove it is to add .edgesIgnoringSafeArea(.bottom) after the .bottomSheet, but this will also apply to my view. Is it possible to fix this in the library?

First option:

.bottomSheet(bottomSheetPosition: $bottomSheet.position, options: bottomSheetOptions) {
    switch bottomSheet.state {
    case let .actions(thread):
        ActionsView(target: .thread(thread))
    default:
        EmptyView()
    }
}

Simulator Screen Shot - iPhone 13 - 2022-06-08 at 15 15 36

Second option:

.bottomSheet(bottomSheetPosition: $bottomSheet.position, options: bottomSheetOptions) {
    switch bottomSheet.state {
    case let .actions(thread):
        ActionsView(target: .thread(thread))
    default:
        EmptyView()
    }
}
.edgesIgnoringSafeArea(.bottom)

Simulator Screen Shot - iPhone 13 - 2022-06-08 at 15 15 17

@lucaszischka lucaszischka added the enhancement New feature or request label Jun 17, 2022
@lucaszischka
Copy link
Owner

I added an option to disable the save area insets (.disableBottomSafeAreaInsets). Will be published later today.

@flowbe
Copy link
Author

flowbe commented Jun 20, 2022

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants