PaoloCuscela / Cards

Awesome iOS 11 appstore cards in swift 5.
MIT License
4.2k stars 274 forks source link

Dismiss detailViewController on iOS 13 Simulators #121

Closed Ragazzetto closed 4 years ago

Ragazzetto commented 5 years ago

Hi Paolo There's a bug compiling with Xcode 11 beta and iOS 13 beta ...

The cards open correctly but when you close the detail view the screen becomes black and there is no way to do anything more

In addition, opening the CardPlayer causes the app to crash.

*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:<Player.Player: 0x1040b0800> should have parent view controller:<ViewController.DetailViewController: 0x103332d30> but actual parent is:<MyProject.CardsViewController: 0x103320520>'

Thank you so much for your valuable work

Vanni

jehumo commented 4 years ago

This is is happening in Xcode 11 final version, only using iOS 13 simulators. iOS 13 is unable to handle the dismissal of the detailViewController nicely.

Ragazzetto commented 4 years ago

In my case it is happening (with final version of Xcode 11) also on real device and not only using iOS 13 simulators. Any idea ?

jehumo commented 4 years ago

I think is a genuine iOS 13 issue, this article show some tips around dismiss that might help to mitigate the impact https://medium.com/@hacknicity/view-controller-presentation-changes-in-ios-13-ac8c901ebc4e

denis-couras commented 4 years ago

Hi, add modal presentation style equals fullScreen for DetailViewController in Card.swift for function cardTapped

emreisik95 commented 4 years ago

Hi, add modal presentation style equals fullScreen for DetailViewController in Card.swift for function cardTapped

It is not worked for me. It's still returns black screen both of simulator and physical devices.

devkirios commented 4 years ago

Hi, add modal presentation style equals fullScreen for DetailViewController in Card.swift for function cardTapped

It is not worked for me. It's still returns black screen both of simulator and physical devices.

Hi In the function "shouldPresent" of file Card.swift add the following code: detailVC.modalPresentationStyle = .fullScreen

With iOS 13 should force the fullscreen

regards

Ragazzetto commented 4 years ago

Thanks @devkirios Finally problem solved!!!

emreisik95 commented 4 years ago

Hi, add modal presentation style equals fullScreen for DetailViewController in Card.swift for function cardTapped

It is not worked for me. It's still returns black screen both of simulator and physical devices.

Hi In the function "shouldPresent" of file Card.swift add the following code: detailVC.modalPresentationStyle = .fullScreen

With iOS 13 should force the fullscreen

regards

Thank you! You saved my app!