Slide trough images horizontally within a list (horizontal tables)

Discussion in 'iOS Programming' started by clickbeast, Dec 26, 2014.

  1. clickbeast macrumors newbie

    Joined:
    Dec 26, 2014
    #1
    Hello,

    I am trying to find something out for a while now. But can't find anything on the web really. So i wanted to ask the question on how to be able to achieve this.

    I am making an ios app where I want to be able to flick trough images both horizontally and scroll vertically like a tableview.

    I have looked around a bit and there seems to be various approaches to this. Via a page view controller, turning table view cells,... but nothing really shows what I want to do. The one tutorial which looks the most like it is this one. http://www.raywenderlich.com/4723/h...izontal-tables-like-the-pulse-news-app-part-2. The only thing is when you scroll tough the images here it keeps scrolling and doesn't place the next element nice in the middle where it fills the screen. Also it's a pretty old tutorial and a lot has changed.

    I have included a schematic on what I want to be able to achieve maybe this could make it more clear.

    https://dl.dropboxusercontent.com/u/26372231/schematic-horizontal-vertical.png

    It's kinda like in the facebook app where you can scroll trough your newsfeed and when you see a picture you can somethimes flick to the right to see the next one.

    Maybe someone knows a good way to achieve this or a good tutorial?

    Sorry for my bad english I am not native...


    Thanks :)
     
  2. PhoneyDeveloper macrumors 68030

    PhoneyDeveloper

    Joined:
    Sep 2, 2008
    #2
    One way to do this: The horizontal scrolling is a single scrollview for each row. Vertical is either a tableview or a scrollview. (UITableView is a UIScrollView subclass.)

    Most of the sample code I've seen shows how to have horizontal scrolling of images using one or more scroll views. The scrollview has pinch and zoom built-in so each of your cells in your sample image is probably a scrollview.
     
  3. clickbeast thread starter macrumors newbie

    Joined:
    Dec 26, 2014
    #3
    Thank you :D ! I will defiantly look into that, somebody else suggested me using a UICollectionView inside of each cell. What do you think?
     
  4. Ubuntu macrumors 68000

    Ubuntu

    Joined:
    Jul 3, 2005
    Location:
    UK/US
    #4
    I'd be tempted to go with this route. I'd make a UITableViewCell subclass that has a UICollectionView property. You could go with the UIScrollView implementation but I'd recommend the UICollectionView as you have all the datasource/delegate methods out of the box.
     

Share This Page