HarshilShah / DeckTransition

A library to recreate the iOS Apple Music now playing transition
MIT License
2.19k stars 168 forks source link

DeckTransition 3.0 #109

Open HarshilShah opened 5 years ago

HarshilShah commented 5 years ago

Hey all,

Sorry it’s been a while, this took a bit longer than I’d expected, and then iOS 13 hit and that made it take a bit longer.

Originally, I was planning address some different issues with this major update, however in light of the transition changes in iOS 13, I’ve had to made some changes to the plans. While custom transitions and variable height presentations were to be the main focus, I’ve decided to push those back in favour of prioritising bringing the design and implementation up to par with Apple’s.

The goal for now is to essentially make DeckTransition functionally identical to the default iOS 13 transitions which will enable backporting the new UI for now, and then building in features which Apple doesn’t have yet such as the two mentioned above, better customisability on iPads, and so on.

Here’s a list of all the changes I’m hoping to get in:

The iPhone part of this changelog is relatively trivial. The iPad part will take significant work, especially given the smart things Apple is doing with handling corner radii in split view, for example.

Additionally, I think I’ve found solutions to some prevalent bugs such as the weird transforms for certain UITableView rows and some others.

It should be possible to retain support for upto iOS 11, however iOS 9 and 10 will likely have to be dropped.

The plan is to have a draft of this change in within a few weeks, time permitting.

I’d love to hear any thoughts people using this library have about these planned changes or any ideas.

pichfl commented 4 years ago

We are considering using DeckTransition for the next iteration of TortugaPower/BookPlayer and could really use what you describe here. Is there something we can contribute in particular?

HarshilShah commented 4 years ago

@pichfl Thank you for posting! For now, any feedback with respect to the planned features would be great. I’m currently just trying to work out some of the nitty gritty of UIKit and after that I’m going to have a beta branch and draft PR up, and it’d be great if you could try that once that’s up

pichfl commented 4 years ago

The first three items in your list are very interesting to us, as they bring this closer to what's available in iOS 13.

On a more pressing matters with the current version: We are experiencing some problems with interactions after any interaction on the view that is presented by DeckTransition. I'm afraid I'm not keen on details (doing mostly the design work), but maybe @GianniCarlo can chime in 👍

GianniCarlo commented 4 years ago

sure, the setup for our next player (which would use DeckTransition to be modally presented) has as a root controller, a UIPageViewController, which in turn contains 3 pages:

I tinkered a bit with DeckTransition's code, limiting the pan gesture's shouldBegin to movements that had vertical velocity only. And it kind of worked, the problem was when I interacted with the tableview in the first page, the horizontal pan gesture of the PageController stopped working. I tested this setup afterwards with iOS13 way of presenting the modals, and it worked fine. So if we can help in any way to bring DeckTransition to work on par with iOS 13 new way of presenting the modals, we'd be happy to help

HarshilShah commented 4 years ago

Yeah the scroll view thing is a bit tricky. It’s on my list and I’d like to get it in before moving to things like custom sizing, but I think it’ll have to wait a bit until after this release. In the meantime, it would be great to have a minimal demo project based on the example app. Also if you folks manage to figure out any solutions that can be general purpose enough, PRs are welcome!