I got a UICollectionView with several cells on the screen.
I want to add one animation that can zoom out/in the cell;
The logic behind is when clicking the cell, it will invoke [self.navigationController pushViewController:_chartViewController animated:NO];
I am not clear how to zoom in/out the new _chartViewController
Looking for the APIs and some key takeaways for doing it. Thank in advance!
Actually, what I am looking for is here, on GitHub . Also, check out objc.io Issue 5
What you're looking for is called a Custom Segue Animation. In your example you click a cell and it zooms to another view controller.
You can find a good example here that uses a tableview instead of a collection view: https://github.com/visnup/tableview-open
This code employs a tableview - when a cell is clicked it "zooms" to the respective view controller that is associated with that cell.
I have added the following lines in to the viewDidLoad method of my UICollectionViewController:
[collectionView setMinimumZoomScale: 0.25];
[collectionView setMaximumZoomScale: 4];
or check this .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.