Question

i have a question on iOS7 and the Custom UiViewControllerTransistion. I want to make a custom transistion between a fullscreen UiCollectionView and a modal View (iPad) with the details of the selected item on the collectionView. The animation should be like that when you tapped on a item in the collection the item will scale/zoom to the final Position of the Modal View with the details, and when you tapped then outside the modal view, the modal will be dismiss automatically. The dismiss animtion should be a kind of reverse animation. It should seems to be that the modal view "falling back" to the item in the UICollectionView. The transistion is the like in the Apple Podcasts App on the iPad, when you select a Podcasts and it will show you the details of Podcats in a kind of Modal View. I hope you can understand what i mean:)

So i have no idea if its only a custom transistion or if i need a custom uicollectionviewlayout for it. It would be nice if you can explain what i have to do for it.

xxAvarlonxx

No correct solution

OTHER TIPS

You have to get the frame of the tapped collectionViewItem. This is done like follows

- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
    UICollectionViewLayoutAttributes *attributes = [collectionView layoutAttributesForItemAtIndexPath:indexPath];
    CGRect cellRect = [attributes frame];
}

Then you initiate your viewcontroller, set its frame to the frame of the cell and then use -animateWithDuration:completion: to make the animation.

I actually did that even in iOS6.

I hope that helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top