UIPageControl or Horizontal UICollectionView? - ios

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

Related

Stretchy header view for UICollectionview and minimize UIImageView while scrolling up

I am trying to achieve a certain layout that looks like twitter and many other apps. Some people do it in UIVIewLayouts but I want to achieve it using this way (if possible ). As you see in the attached image. I have Header, and cells in the collectionview.
While scrolling up I want to minimize the imagview avatar inside the headerview. -> ( ViewForSupplementaryEelementHeader )
while scrolling down, I want to make the top UIImageview to be fixed to the top and stretchy
Thank you all in advance
*ps I am doing all of this in code nothing with storyboard and I dont want to use it at all.
Please advise me how to access these imageview while scrolling up and down.
I think this is the example you are looking for
https://github.com/sunlubo/StretchyHeaderView
This will add only tableview in storyboard...other all the work is done through coding

How create a tableView that covers an image when it is scrolled

I'm trying to develop something like CSStickyHeaderFlowLayout but customized for my table, but I'm not sure how can I achieve this goal. The idea is
Someone can give me a hint how achieve this objective?
To add to Vollan's answer, to make the title stay still you could use a view that contains two subviews: the first is the scrollview (with the image and table as Vollan suggests) and then add another view (like a UILabel) for the title. Thus, while the image and table scroll in the scrollview, the title will stay still.
Best solution would be to wrap everything inside an UIScrollView. That will allow you to scroll to bottom of the screen and then only scroll the tableview. That way it will appear like the tableview will overlay the image.
While using a tableview within a scrollview would likely work, your tableview would have to always be it's full size (without some annoying constant re-sizing), so you'll lose the value of the enqueuing/dequeueing that makes tableViews work so well.
The CSStickyHeaderFlowLayout has example pretty similar to what you want to do, did you look at their examples? You may be able to play with it and get it to do what you want If your problem is simply having a constant title, you can just add a view above the table or use the NavBar and adjust the contentInsets
You might also consider using a collectionView instead. It's much more flexible as far as layout goes.

Working with UIScrollView and UICollectionView

In my project, I'm trying to do an app similar to Instagram where I can scroll endlessly on the images that I have inside my personal profile. While scrolling, the top portion of my profile details is above where the whole screen will be filled with my photos when continuously scrolling thru my photos.
I think the way to achieve this is using UIViewController and working with UIScrollView and UICollectionView. However, my issue here is how do I create a custom height of the UICollectionView or UIScrollView in order to show the proper or exact height of the View? As such, I do not want to see "white spaces" at the bottom, or "cut" pictures.
I've tried using let height = CGRectGetHeight(self.myCollectionView) to get the height, but it always return me with the height I fixed in my IB regardless the number of items I have.
Could someone share with me the structure how I should do it? Many thanks!

UIScrollView with parallax like Airbnb

I'm trying to create a scroll view like the one used in the airbnb app.
At start the view display the image and under the image there is many subviews with info.
when scrolling the image start to shrink in a parallax way till it's gone.
Any ideas how to implement it ? I prefer to understand how it's done rater then using some github control

slideshow of a collection of images managed with 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.

Resources