Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7825491
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:00:55+00:00 2026-06-02T09:00:55+00:00

I want to add 4 UITableViews on my scrollview and poppulate them with some

  • 0

I want to add 4 UITableViews on my scrollview and poppulate them with some different arrays(let’s say i have one array for each). I have added this scrollview too to my self.view(i do this stuff on a UIViewController class). How can i populate my Tableviews can anyone help please?

Some More Details:

here is a screen shot;
enter image description here

Here is the interface of my UIViewControllerClass

#import <UIKit/UIKit.h>

@interface MainMenu : UIViewController<UITableViewDelegate>

@property (retain, nonatomic) IBOutlet UIScrollView *scrollView;
@property (retain, nonatomic) IBOutlet UITableView *group1;
@property (retain, nonatomic) IBOutlet UITableView *group2;
@property (retain, nonatomic) IBOutlet UITableView *group3;
@property (retain, nonatomic) IBOutlet UITableView *group4;

@end//i drag/dropped from IB, so there is no problem with synthesizes..

I want to populate these tableview with different arrays, how to handle this situation..? Thanks a lot

Additional Note; i tried something like this but no effect:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [group1 dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }

    NSArray *array=[NSArray arrayWithObjects:@"one",@"two",@"tree", nil];
    cell.textLabel.text = [array objectAtIndex:indexPath.row];
    return cell;

}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T09:00:56+00:00Added an answer on June 2, 2026 at 9:00 am

    dude, first you will make the uiviewcontroller de delegate and data source of all 4 tables, after that you will assign a different tag for each table.. and then you will add the delegate and datasource protocols… and the you will implement the datasource and delegate methods like a normal uitableviewcontroller… all these methods receive a Uitableview parameter, so you will test the tag of this table view like:

    ...
    
    if (tableView.tag == 10) {
    //implement the table 1
    NSArray *array=[NSArray arrayWithObjects:@"one",@"two",@"tree", nil];
    cell.textLabel.text = [array objectAtIndex:indexPath.row];
    
    } else if (tableView.tag == 20) {
    //implement the table 2
    } else if (tableView.tag == 30) {
    //implement the table 3
    } else if (tableView.tag == 40) {
    //implement the table 4
    }
    
    return cell;
    

    this way you will use the same method to do all the table views..

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website built with ASP.NET (3.5) and want add some level of
I have a MainViewController, and I want to add two UITableView's to it, each
i have a grouped tableview which contains 3 sections,i want to add different buttons
I want to add multiple columns in UITableView. I have created one CustomeTableCell with
I have a UITableView with an Index on the side; I want to add
I have dbml with single table users i want add partial class for User
I have a list of string values that I want add to a hashtable
I have numbers in javascript from 01(int) to 09(int) and I want add 1(int)
I have a simple UITableView, and I want to add a checkmark whenever I
I'm modifying some code that I've been left with and want to add some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.