Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeckTransition 3.0 #109

Open
HarshilShah opened this issue Aug 31, 2019 · 5 comments
Open

DeckTransition 3.0 #109

HarshilShah opened this issue Aug 31, 2019 · 5 comments

Comments

@HarshilShah
Copy link
Owner

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 swipe-to-dismiss gesture should use an interactive transition.
  • View controllers should be able to dynamically specify when a dismissal is allowed.
  • The corner radius handling needs improvement. On devices and features with rounded corners (so the X-series iPhones, newer iPad Pros, and split view on iPads) the presenting card should animate from the device’s corners.
  • The iPad UI needs a complete rethink. It should essentially be a 1:1 match of Apple’s designs which scales up from a page sheet to the current style based on the user’s dynamic type settings.

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
Copy link

pichfl commented Oct 3, 2019

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
Copy link
Owner Author

@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
Copy link

pichfl commented Oct 6, 2019

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
Copy link
Contributor

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:

  • First page a UINavigationController with its root being a UITableViewController (representing the chapters of the book)
  • Second page a UIViewController (representing the player)
  • Thired page a UINavigationController with its root being a UITableViewController (representing the bookmarks of the book)

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
Copy link
Owner Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants