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

Support dynamic height when inputting? #23

Closed codwam closed 5 years ago

codwam commented 5 years ago

Description

Describe your issue here.

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. Add a textField at the bottom
  2. Present ViewController
  3. Tapped textField

Expected result:

Keyboard should not obscure textField.

Actual result:

Attachments:

ste57 commented 5 years ago

Hi @codwam,

There are two ways in which I would imagine you could work around this:

1) https://github.com/slackhq/PanModal#updates-at-runtime Track keyboard changes and expand the modal on display - or collapse on keyboard dismiss. We currently do this in the new iOS emoji picker on slack when you tap "Add Reaction"

2) Wrap your content in a scrollView and adjust the contentInset when the keyboard appears

Let me know if this helps 🙂

Stephen

codwam commented 5 years ago

Thanks