alekseyn / EasyTableView

Horizontal and vertical scrolling table views for iOS
BSD 3-Clause "New" or "Revised" License
584 stars 157 forks source link

More than one horizontal view #8

Closed kimg closed 12 years ago

kimg commented 12 years ago

quite simply, is it possible to have more than one horizontal tableview?

i need to have two and they should be able to slide independently. it doesn't seem to work when i try to create two horizontals. one is slideable the other is not.

kim

alekseyn commented 12 years ago

You can have any number of horizontally scrolling EasyTableViews, or vertically for that matter. That's what the sample code demonstrates (one vertical and one horizontal). Check your code. I'm pretty sure you may have done something wrong.

kimg commented 12 years ago

thank you for answering so fast. i'm new to ipad development so my question my seem very basic. but im a bit confused.

if i create horizontal1 and horizontal2 won't they get created in exactly the same row/column on the screen since the create method uses the same xOrigin and yOrigin?

kim

kimg commented 12 years ago

i have done a bit more research.

starting point is your code - no changes. everything works.

if i substitute: tableView = [[UITableView alloc] initWithFrame:CGRectMake(xOrigin, yOrigin, self.bounds.size.height, self.bounds.size.width)];

with

tableView   = [[UITableView alloc] initWithFrame:CGRectMake(314, -375, self.bounds.size.height, self.bounds.size.width)];

it moves the horizontal scroller approximately half its own hight from the bottom. when i try to drag the scrolller from the upper half i cant scroll it. but if i try from the lower half it scrolls. it's like there is some kind of overlay that i dont know how to move together with the scroller. do you follow me? i guess there's something in the code i don't understand.

can you guide me?

kim

alekseyn commented 12 years ago

I would not modify EasyTableView if you do not know what you are doing. Go to EasyTableViewController and substitute the following code for setupVerticalView. This demonstrates two horizontally scrolling table views:

kimg commented 12 years ago

Thanks a lot. Exactly what i was looking for.

saved my day.

Kim

alekseyn commented 12 years ago

Glad you got it working!