First of all, I do not want to create a simple 2 or 3 columns gallery. I need exactly like the screenshot of Photos App, I've attached to the question. Big image can be paginated, thumbnails ill be scrolled, selected image's thumbnail will be animated.
I have some ideas.
1st, I can use collection view for the thumbnail scroller. (I have already done that.) But big images' pagination and animation of the selected images thumbnail is the trick here.
2ns, I can use UIPageViewController for the big image, but how can I achieve the page control with the thumbs, it is the problem.
Any ideas? Thank you.
You can do that observing the scroll view of the thumbnail's UICollectionView. UICollectionViewDelegate inherits from UIScrollViewDelegate, so you can receive notification of the scroll movements.
For every scroll position, check which cell is in the center point of the collection. As soon as that cell changes, you control the UIPageViewController.
Related
I am looking to achieve a similar effect to the Netflix app where at the top they have a scrollable header displaying different 'featured' movies.
As soon as the header start to scroll and the next image enters the view it downloads the image, also while being scrolled if you let go it snaps into place the image that was currently being shown the most.
I am not sure how to proceed and try to solve this problem. Any suggestions? should I look at using UIPageControl, or should I use a horizontal UICollectionView?
Thanks
You can implement it by using a horizon collection view,it can help you handle the reuse of imageViews!Or you can use a UIScrollView to contain a couple of subViews to display the image or three subViews and switch the image content
I have used the separate banner image and scroll view for category sections and tableview for records.
Need to make all things scrollable to topside and when the scroll position reached the top position category section would fixed at top position and the table view records would continue scrolling and once the scroll down all the object would displayed to their original position back to back well which is normally happen in android apps and whatsapp profile page.
Please share your answer if you have done like this.
Here is the link for DTParallaxTableView
QMBParallaxScrollViewController
This Library same you want MXSegmentedPager
May this helps lot.
How can I stack cells (in a UICollectionView) on top of each other? Feedly does it quiet well and I was wondering if I can somehow manipulate the zIndex property to get a similar effect in navigation of a UICollectionView.
Or am I wasting my time with UICollectionViews and should be looking into changing my approach with perhaps a Container View Controller?
In order to accomplish this my team added a basic full page horizontal cover flow layout to a uicollectionview. We then added a pan gesture recognizer and disabled scrolling on the collectionView controller. As soon as the pan gesture starts we screen cap the cell and place the image over the collectionView. Once that is done we manually change the page of the collectionView to the next page behind the screenshot. We then animate the uiimage (the screen cap of the previous page) along the path of the gesture. If it goes past a threshold we commit the animation and remove the image and you get the full effect of a previewed collectionView cell.
Unfortunately the threshold checking is a bit tedious because you must revert. Also the animation for bringing a cell back is a little quirky. With this method if you don't add it as a special case then it looks the cell is always behind. Since we want it to look like a stack we made sure that it looks like you are pulling the previous cell from offscreen to the top of the stack. This is done by keeping a collection (NSArray) of cell screenshots that matches are data source so basically we can just grab the image based on indexPath.row. Do the pan gesture recognizer to bring it back on to the stack. If it passes the threshold we commit the animation and at the end change the current cell of the collection view and remove the screenshot. So it feels seamless.
There is really nice write up regarding this, jump onto this website and you will find everything you need.
http://skeuo.com/uicollectionview-custom-layout-tutorial
Basically what you are looking for is the CustomLayout.
You can use CHTCollectionViewWaterfallLayout to create pinterest-like-layout. It's created on top of UICollectionView.
I'm using a UICollectionView (with horizontal layout) to manage a collection of images. The view controller that manages the collection view has the bottom toolbar visible with a play button to start a slideshow of the images in the collection. My question is what is the best way to implement a slideshow that involves a collection view? My initial thought was to try to make the collection view changing the visible cells with a UIView transition (transitionFromView or transitionWithView) with a cross dissolve option but I didn't get the effect I was expecting (maybe something wrong in my code). The other idea I had was to simply add a subview to the collection view to handle slideshow. This subview would have access to the data source and be able to iterate through the images. Don't know if this last option is a good way to approach the problem. Anyone has ever tried this and/or what would the recommendation be to solve this problem?
My idea is no need of collection view. In scrollview place imageview which display images. In timer Change the offset of scrollview. so it looks like automatically images are changing as like slide show.
I have a UIView in which I get certain information about a user, wthin a bunch of textfields and a bunch of photos of him, if available.
No Im a bit limited here, so I must have a UIImage or UIImageView on my View (only the first half of my view, to display this images.
Up to now I have a array of this images in the background and as soon as the user swipe over the UIImageView, the image shows the next.
But it's ugly, becuase there is no real paging (you know, see the second image in pieces while you swipe, at the moment its only a UIMageView.Image = xxx and its ugly) and no zooming (zoom on click).
Any idea to solve this?
Use an UIScrollView and place all of the images in it (as UIImageViews).