2

I want horizontal paging to a new UITableView and keep the possibility of vertical scrolling. For the paging scrolling problem, this should help me: UIScrollView paging in single direction

But I am first of all wondering how I should set up the different UITableViews? Do I have to set up different UITableViewController, or (what i think would be the correct solution) do I have a Scrollview where I can Load different UITableViews ?

Something like this but with TableViews instead of Colors?

NSArray *colors = [NSArray arrayWithObjects:[UIColor orangeColor], [UIColor greenColor], [UIColor blueColor],[UIColor   redColor], nil];
 for (int i = 0; i < colors.count; i++) {
     CGRect frame;
     frame.origin.x = self.scrollView.frame.size.width * i;
     frame.origin.y = 0;
     frame.size = self.scrollView.frame.size;

     UIView *subview = [[UIView alloc] initWithFrame:frame];
     subview.backgroundColor = [colors objectAtIndex:i];
     [self.scrollView addSubview:subview];

 }

 self.scrollView.contentSize = CGSizeMake(self.scrollView.frame.size.width * colors.count, self.scrollView.frame.size.height);

If this is the right way, how do I set up the different TableViews??

I really have no idea how to realize this, an hope that somebody can help me :D

Community
  • 1
  • 1
Kito
  • 1,375
  • 4
  • 17
  • 37

0 Answers0