How to create a horizontal scrollable list? - iphone

I am wondering what the best approach is for creating a horizontal list with custom buttons. I read there is no native control for that:
I am considering a UIView with a scroll view inside. On this scrollview I visualize my array of button objects.
Any thoughts?

Using a UIScrollView with paging and only horizontal scrolling should give you a good start.
Look at a PageControl example from the iPhone SDK.

Related

Multiple regular vertical tableviews inside of one horizontal collectionview

Hello I am trying to display multiple vertical table views inside of ONE horizontal view on iOS. Is this possible? The table views themselves should be able to scroll vertically like normal but I should also be able to scroll horizontally between multiple tableviews, all in the same viewcontroller (if possible). I have attached an image of what it should look like . As you can see, I should be able to scroll the tableviews vertically independently from the horizontal scrolling that is used to display different tableviews. All while keeping the header visible (Engineering, Scholarships, etc.
What strategy should be done on iOS/Swift, is there a tutorial? I am OK with using a UICollectionView instead or any other type of view. Thanks so much!

Can we add a scroll view inside UITableViewCell?

I have requirement where I have to show some images which are differentiated according to Groups they belong to. I have used a table view to view images listed under groups. User has to scroll horizontally to view more images in a particular group.
Can we add a scroll view to tableview row to allow user to scroll list of images horizontally?
I searched a bit, some comments say its not allowed in apple's HIG some comments say
You can add a UIScrollView to a UITableViewCell and as long as you set the contentSize property of the UIScrollView correctly then the UIScrollView will scroll correctly in the horizontal axis
May I get any confirmation on this ??
Or any alternative approach to achieve horizontal and vertical scrolling for different data without using tableview
Yes it is definitively possible and reasonable.
Here is an excellent tutorial by Felipe Laso that explains it step by step:
How To Make An Interface With Horizontal Tables Like The Pulse News App: Part 1
How To Make An Interface With Horizontal Tables Like The Pulse News App: Part 2
BTW, the approach described in that tutorial is way more efficient than adding a UIScrollview to each cell.
Of course you can add scrollView in tableView.
UIScrollView *scrollView=[[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 320, 100)];
[cell.contentView addSubview:scrollView];
Now you can set properties for scroll view accordingly.
Sure, this is possible. A UIScrollView inside a UITableCellView will work fine - the HIG says no, probably because it'll be hard to use. The user would have to accuratley scroll either up/down, or left/right and it might be annoying. Shouldn't take long to knock together a quick test.
I have an app with 2 scrollviews - one that allows horizontal scroll, and then inside that another scrollview which allows vertical scroll. The idea is that the user can flick up/down a page, then also flick left/right across pages.
It's not that nice to use, but it's what my client wanted ;)
To make a UIScrollView only respond to horizontal or vertical scroll is all about setting the correct contentSize. Hope this is some help.

Better to use UIScrollView or UITableView for horizontal buttons?

I have a page enabled scrollview on an iPad. On the first page, I have a child scrollview that scrolls horizontally through image buttons. The buttons scroll the outer scroll view to the correct page. Its basically like a table of contents that jumps to the correct page.
My end goal is to be able to categorize the buttons seen in the child scroll view. So there would be a segmented control that changes what buttons you can see. So maybe one category would be ALL, and another category would be A-M, and another would be N-Z for example.
My question is, should I use a uiscrollview or a uitableview?
Right now I use a scrollview and it is really easy to get the buttons in. I could implement the different categories kind of gimmicky by having all of the buttons in the scrollview and then just showing or hiding the buttons accordingly. I feel that it'd be bad memory usage though.
For a uiscrollview i was looking at using EasyTableView, butI'm not 100% sure if this is compatible with what i want to do or if it'd even be better.
Any ideas for what the best way to implement this is? Specifically, I'm not sure of the best way to change the buttons when I change categories.
Thanks!
Use a tableview when you are dealing with data that is best expressed as sections and rows.
I think for your situation I'd have a UIView subclass that can display the images you need for a given category. Stick that on the outer scrollview as needed. You can keep memory low by only keeping the currently visible view and the ones on either side on the scrollview. When you scroll to a new location you can recreate the view needed for that page, and the ones surrounding it. Then you release the ones that are far away and let the system reclaim their memory if needed.

How to recreate a Pulse-like UI?

I was wondering how to make image display through a table like the application Pulse on iPhone. I used UIScrollView but it did not help much. It only displayed images in a nice array-like manner but you could not produce an event or click on the image.
What's the best way to produce a Pulse like application for displaying images and heading information in an array-like style?
use Ray Wenderlich tutorial about THIS topic
tutorial
The Ray Wenderlich pulse tutorial does have an issue where if the horizontal table view has not been scrolled (or its first element is aligned with the left of the screen) you can't drag right and have the content pull that way and then bounce back. This makes the scrolling experience feel pretty bad.
The simple solution though is to put the horizontal table view inside a scroll view and then everything just works.
It looks like a UITableView with rows that are composed of UIImageViews. Its got a nice touch where you can scroll horizontally within a row, like with Twitter's app. That's most likely done with a UIScrollView (scroll bars removed, with end bounce). Peter Boctor wrote a web blog post on how to do something similar, if I recall.
It's a UITableView with each row containing a UITableView that is rotated by 90°. The cells for the UITableView in each row are custom views that are likely either subclasses of UIImageView or just plain UIView.

iPhone how to create scrollable filter like Mashable App?

I'd like to create a scrollable filter just below the navigation bar like in the Mashable iPhone app.
Here's what it looks like:
http://itunes.apple.com/us/app/mashable/id356202138?mt=8
http://img20.imageshack.us/i/mashable.png/
Does anyone know how to do this ?
That's certainly a custom UIView added as subView to their UITableView...
Yes this can be done by adding a number of buttons in a UIScrollView by a loop and then add two custom buttons (one for left arrow and one for right arrow) over your scrollView.
or
you can follow the tutorial
http://blog.sallarp.com/iphone-sliding-menu/