slackhq / PanModal

An elegant and highly customizable presentation API for constructing bottom sheet modals on iOS.
MIT License
3.69k stars 533 forks source link

put Drag indicator inside the controller like Apple default implementation #89

Open valentinjahanmanesh opened 4 years ago

valentinjahanmanesh commented 4 years ago

Description

is there a easy way to put the drag indicator inside the controller? I saw that I can change the Yoffset that is currently -8, but is there any option out there?

image

What type of issue is this? (place an x in one of the [ ])

Requirements (place an x in each of the [ ])


Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

PanModal version:

iOS version:

Steps to reproduce:

1. 2. 3.

Expected result:

What you expected to happen image

Actual result:

What actually happened

Screen Shot 2020-03-16 at 2 47 29 AM

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

ste57 commented 4 years ago

Hi @farshadjahanmanesh,

Thanks for the report. We chose to only support the drag indicator outside of the view as rendering inside would not be straight forward for views that are presented with PanModal.

However, you can add this yourself to the VC you're presenting directly after disabling the indicator in PanModal (set showDragIndicator to false) but we don't have any current plans to add this within the PanModal library.

Stephen

bjtitus commented 4 years ago

Hey @ste57,

We chose to only support the drag indicator outside of the view as rendering inside would not be straight forward for views that are presented with PanModal.

Do you have any more details on your thoughts here?

I’ve got a need for this functionality and had success adjusting the safe area insets to account for the indicator. That way the content is able to adjust its positioning the same as it would for the home indicator.

I was hoping you might have some input on things I might be overlooking. 🙂