0
votes

I use a table view which has got the cells with varied set of information and which can not be contained with in the frame of the tableView. So I do need to have a horizontal scrolling capacity in the table view.

Since horizontal scrolling is not possible with tableview,I planned to use a scrollView with horizontal scroll. I added the tableView on top of the scrollView.

The problem I face is irrespective of the content size property of the scrollview, the scrollview never scrolls beyond the contentOffset value X of 256-320 pixels.

I am planning to achieve the effect as it is in the below screen shotenter image description here

3
So are you now using a UIScrollView?user529758
Maybe UITableView isn't the way to go. I suggest you use a simple UIScrollView and manually populate it with custom UIViews.Ismael
yes H2CO3. On top of UIScrollView I add the UITableViewKrishnan
Some code on how you add the tableview inside the scrollview may be helpfulEren Beşel
I did everything using Interface BuilderKrishnan

3 Answers

0
votes

Try two things,

First Set the TableView height as total numberOfRows :

tableView.frame.size.y  = numberOfRows * 44;

now disable the tableView Scrolling

and set he scrollView contentSize as per your need;

scollerView.contentSize = numberOfRowsintableView

Surely it will solve your problem

0
votes

Set proper ContentSize for ScrollView in ViewDidLoad.

scollerView.contentSize = CGSizeMake(Width,Height);

Calculate the Width as Per Requirement And Height (you are using Tableview So You can take Height same as View Height)

Then it will Surely Scroll.

0
votes

I implemented the entire functionality using code without using interface builder. It works as expected now. I did not know why it did not work when used with interface builder.