Lickability / PinpointKit

Send better feedback
MIT License
1.13k stars 79 forks source link

Allows customization of modal presentation style #239

Closed ChristianSteffens closed 6 years ago

ChristianSteffens commented 6 years ago

Adds presentation style to feedback configuration. Reloads tableView upon dismissing the editor.

What It Does

This PR allows the customisation of the FeedbackView/NavigationController's modalPresentationStyle (current default is fullScreen). I added the property presentationStyle to the Feedback's Configuration struct (defaults like before to fullScreen).

Furthermore we added a tableView reload to the editorWillDismiss callback so that not only the annotedScreenshot will be assigned, but also the new annoted screenshot will be shown by explicitly reloading the tableView. Using the previous 'fullScreen' presentationMode this wasn't necessary, since it that case the tableView was always implicitly reloaded.

How to Test

Run the example application like before - it will be presented as a 'formSheet'.

Notes

The reason for this change was the previous - hardcode - fullScreen modal presentation style. This results in the hiding of the calling ViewController. This might be fine for the most use(r)s, but in our case we need the presentationStyle overFullscreen / overCurrentContext - so that the calling ViewController will not be hidden as soon as the FeedbackController is been shown.

mbbischoff commented 6 years ago

Hey! Thanks for the PR. We’ll take a look at this for review shortly.

mliberatore commented 6 years ago

Thanks for another contribution @LordNali!

The changes look good, and I’ve tested them. Do you mind reverting the changes to the example project’s ViewController.swift? The changes were helpful for testing, and we’d like the out-of-the-box example to use the default configurations for simplicity.

ChristianSteffens commented 6 years ago

Sure thing - just reverted the changes to the ViewController / Example.