SvenTiigi / WhatsNewKit

Showcase your awesome new app features 📱
https://sventiigi.github.io/WhatsNewKit/
MIT License
3.87k stars 190 forks source link

[iPad] Default primary action does not dismiss the WhatsNewViewController #58

Closed john-work-ios closed 1 year ago

john-work-ios commented 2 years ago

WhatsNewKit Environment

What did you do?

on iPad, the continue button (primary action) does not dismiss. Works fine on iPhone.

What did you expect to happen?

The WhatsNewVC should dismiss

What happened instead?

As a workaround, I used the 'onDismiss' completion to dismiss the controller

SvenTiigi commented 2 years ago

Hi @john-work-ios,

Sorry for the late reply. I have successfully reproduced the bug and I'm currently investigating this issue. I will let you know when a new version is available which fixes this problem ✌️

aehlke commented 1 year ago

any lead on this from your investigation if we'd like to support on a fix?

SvenTiigi commented 1 year ago

Hi @john-work-ios,

I've recently tried to reproduce the bug and it seems like this issue has been fixed with either iOS 15 or iOS 16. Seems like UIKit now passes a correct context for the PresentationMode which is called when the primary action gets tapped in order to dismiss the sheet / presented view controller.

https://github.com/SvenTiigi/WhatsNewKit/blob/641b2f5e771627d172f69ebfc5dda777ee74393d/Sources/View/WhatsNewView.swift#L215-L224

https://user-images.githubusercontent.com/11733014/222533689-b3e76139-8212-45c2-8602-a97fd0950421.mov

SvenTiigi commented 1 year ago

Closing due inactivity. Please feel free to re-open the issue at any time.