Domanda

Apologies if this is a duplicate, but I couldn't find anything on an initial search. And I'm struggling to get my head around the design.

I am attempting to create some interactive transitions between UICollectionViewLayouts using the new iOS7 APIs - UICollectionViewTransitionLayout Documentation

However, I am unsure how best to manage multiple UICollectionViewLayouts within a single UICollectionViewController, or how to interactively move between one and another UICollectionViewController.

This question is more of a design issue, on how to write the code rather than not understanding the actual implementation of interactive layouts and changing layouts - should I be using a UICollectionViewController? I don't really need to subclass a UICollectionViewLayout as I am quite happy with the functionality the UICollectionViewFlowLayout provides.

My ideal and final goal is achieve a UIViewController (or multiple UIViewControllers) that each have a UICollectionView within them, that get push and popped between using UIGestureRecognizers.

Thanks.

EDIT

Also found a similar question that was submitted just before mine, UICollectionView interactive layout transition using iOS 7 APIs

È stato utile?

Soluzione

UPDATE:

I have uploaded my code for my solution to GitHub... it is a work in progress

UICollectionView Interactive Transitions

I have decided on a solution where I will use a single UIViewController, that will maintain several UICollectionViewFlowLayout objects, defined as properties on the controller.

Each will be configured according to how I wish the UICollectionView to look.

I will then make use of interactive transitioning with iOS7 to handle transitioning between the two defined layouts. I can also use this basic call to handle quick non-interactive transitions:

[UICollectionView setCollectionView:animated:]

I didn't receive an answer, so unfortunately do not know if this is the best way to approach the problem.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top