Uitableview horizontal as well as vertical scrolling. - iphone

I want horizontal as well as vertical scrolling whole table not particular cells.
Is it possible.?
Or should I implement simple view and reload again table.
Any Help?

There may be a way to do this however the Apple documentation states...
A table view has only one column and allows vertical scrolling only.

you can use collection-view for the purpose

Related

tvOS UICollectionView scrolldirection

I am currently playing around with the tvOS SDK.
I need a collectionView with multiple section and many items, but only one row per section. So the user can scroll vertically through the sections and horizontally through the items in the single row.
When I set the scrollDirection of the collectionViewFlowLayout to ".Horizontal", the sections and the items are all just in one row, which looks pretty shitty.
Is there another way to get this behaviour? I thought about multiple collectionViews in a scrollView, but this seems too complicated and overheaded for me.
Thanks in advance!
Cheers.
I would think the best and possibly only way to get around this will be to a table view of collection views.
Somebody correct me if I'm wrong but that's the way I would probably go about doing it. Hope it helps!
I was having a similar problem, and it turns out the Collection View I was using wasn't tall enough.
It should be tall enough to accommodate two cells on top of each other plus min spacing in between, and if it is tall enough then the Collection View Cell will appear in the top left corner of the Collection View in storyboard.
Once it is tall enough setting the flow to horizontal should work the way you want it to.

How to implement smooth scrolling using both a UIScrollView and an UITableView?

Is is possible to implement smooth scrolling using both a UIScrollView and placing a UITableView at somewhere starting in the middle of the screen? The UIScrollView contentSize is elongated to accomodate the additional height of the UITableView. The UITableView should be able to contain unlimited and unknown number of rows. Scrolling the entire view downwards will cause the upper non-tableview portion to first disappear and then it scrolls down just like a regular table view.
Put it in another way, I'd like to implement a table with some fixed content before the top row. Think of it like a "header area" for the tables, scrolls up and giving way to the entire table rows.
I probably know that I can implement a TableView and programatically make the first row to contain some fixed images. In this way, it will work as expected. But which is easier to implement?
You really don't want to put the table in a scroll view. When the user scrolls on the table it will not move the underlying scrollview so you won't get the effect you are looking for.
Implement viewForHeaderInSection instead and pass in the view you want to display above the first row, or set tableViewHeader.

How to make first column in UITableView not scroll horizontally in iPhone Objective-C?

I have made horizontally scrollable UITableView by adding a table view to a UISrollView and setting the scroll View frame to be what i want to display and making its content size large enough to hold the table inside it. It works perfectly fine. Now what i need to do is freeze the first column (that is not scroll it horizontally) but remaining table should horizontally.
I thought of doing this. Have a table view A and a UiScrollview containing a table view B aligned. And populate the first column data in table A and populate the remaining columns data in table B. This i feel should work for horizontal scrolling but then it wont have proper vertical scrolling as in the vertical scrolling wont be aligned. So the solution to this mite be to relatively scrolling table A vertically when table B is scrolled vertically and vice versa. But i am not how would i implement this. Any ideas.
Or is there an easier way of doing this.
Thanks
AJ
use two different tableviews. one inside scrollviw and the other outside it. then try using scrollview delegates to scroll through both tableviews simultaneously
Presumably in your cellForRowAtIndexPath method you can say something like
if(indexPath.row == 0)
{
//do not allow horizontal scrolling
}
else
{
//do allow it
}
Sorry for the pseudocode, I haven't seen your exact code so I can't comment on it myself, but that's the general idea.

adding multiple column in UITableView

I have multiple column and row data , i want to place it in table view also i want make it scrollable vertically as well as horizontally . how to do this ? please help...
The UITableView is not meant to be used in a multi column way.
What you can do is to create custom UITableViewCells that look like two or more columns. But that will be just a workaround without the possibility to scroll horizontally.
The other possibility is to implement a UIScrollView. Add a View to the UIScrollView that is wider than the actuall iPhone screen. In this case the user will be able to scroll horizontally. In this case you will in deed not be able to use the predefined API-functionality of the UITableView and you have to render your table on your own.
My library, UIGridView, does what you want.
But it only supports vertical scrolling.
It is built with UITableView, in which UITableViewCell contains many cells inside.
You can try implement your own library, learn UIGridView's code, or use UIGridView.

How to implement UITableView with multiple columns and sideways scrolling

I'm thinking about how I could achieve this kind of UITableView: http://snapplr.com/c1x5
So it has multiple (separately selectable) columns in it which also differ in width. Apart from that it can also scroll sideways to see programs which broadcast later on the day.
Now, I'd like to know how you would implement this kind of feature. A scrollview wouldn't be enough, it has to somehow load newer data. And of course you need to be able to know what column in the cell has been selected.
Hope to hear some thoughts.
That is a custom view.
It's possible it could be a table view, with heavily customised cells, but that would have been a hell of a lot of work to get it scroll horizontally too.
It's more likely that it's a scroll view with a custom grid view type class that have support for arbitrary grid cell widths...
I'm sure if you write something like this you'll have a lot of interested people.
I just updated MDSpreadView, which is basically a UITableView that works both horizontally and vertically, floating headers and all, with an API very similar to UITableView.