Add an option to not use an X button for iPad/Mac
joulupukki opened this issue · comments
It would be great to have an option to specify to not have the "X" button on iPad for my custom sheet. Perhaps a new Bool parameter to the PartialSheetStyle init() functions?
do you mean to have the chance to put a custom icon? or nothing at all...
Because if you mean nothing at all, how can you close the modal?
In our case, I added a Done button in the sheet that we pop up that matches our UI design. We're using a bar at the top of our design that looks like a UINavigationBar with a Done button on the right. With the built-in "X" button it looks really odd because it shows up on top of the nav bar.
I understand.. In the version 3 that is going to be released this night, I will add an Image? parameter for that, so you can set it to nil..
This is what I'm currently doing but it looks bad because there's a bar above the bar that I'm adding to my sheet that looks like a nav bar:
.addPartialSheet(style: PartialSheetStyle(background: .solid(Color.gray), handlerBarStyle: .none, iPadCloseButtonColor: Color.gray /* so that it blends in */, enableCover: true, coverColor: Color.black.opacity(0.05), blurEffectStyle: nil, cornerRadius: 10, minTopDistance: 200))
So, if there could be a way to have it not add the bar at all, that'd be great. Yes, perhaps if you change iPadCloseButtonColor
to iPadCloseButton
and we could specify nil
to have the bar not appear at all, that'd work.
Check version 3.0 and if you still have the issue, feel free to reopen the issue