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

  • SEARCH
  • Home
  • 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 3962584
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:06:50+00:00 2026-05-20T03:06:50+00:00

I want to do the following: I have to create a UITableView at the

  • 0

I want to do the following:

I have to create a UITableView at the runtime depending upon some conditions, at the run time only I will come to know from which database table the data has to be pulled from to be presented in the UITableView to make this problem more complicated I will have to create a custom UITableViewCell also at the run time.

I am not able to think how do I create this UITableView and then how do I create all those delegate method at the runtime.

I will give some more background that will help understand this problem, I am making a request to my server, and the server returns me an xml response object, after parsing I figure out that I have to present a table to the user on a particular action and the table will have custom cell, for which the values are available in the xml response object.

Please help I have been trying to figure out this thing for a while now.

EDIT:

I will try to explain in a different way, if that helps people understand my problem.

Hi, I want, to do the following:

On the runtime(which means while my app is running) I have to create a UITableView depending upon some conditions(some action taken by the user), I will make a server call and will get the data for the UITableView.

There has to be a a custom UITableViewCell for this UITableView that I have created at the run time, I will get the information for the custom UiTableViewCell also at the run time.

So basically I don’t have any thing at the compile time except that I may have to create a UITableView and a custom UITableViewCell.

I am trying to figure out that how do I create the delegate method and custom UITableViewCell at the run time.

One thing that I thought was to have a default class with all the delegate method and when I create UITableView at the run time associate this class as the delegate for the newly created UITableView, let me know if this is an ok solution.

But how do I associate the custom UITableViewCell to this delegate method at the run time is still an issue.

  • 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-05-20T03:06:50+00:00Added an answer on May 20, 2026 at 3:06 am

    You just need to get the new values that you would come to know during the run time and then use [tableViewObject reloadData];

    The delegate functions will remain the same. In IB just place the UITableView wherever you want and set the delegate and datasource to the file owner. Set the hidden property to yes by checking the check box.

    Once the user does some action change the hidden property in the action function as tableViewObject,hidden = NO;

    Your delegate methods will look like

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;}
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
      {
       return [tableData count];
      }
    
      - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath (NSIndexPath *)indexPath 
      {
          UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"acell"];
          if (cell == nil) {
              cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:@"acell"] autorelease];
          }
          cell.textLabel.text = [tableData objectAtIndex:indexPath.row]; 
          return cell;
       }
    

    In this tableData will be your datasource that could be declared in your .h file. In the function that captures the action of the user, you can get the data from the server and add it to the tableData and then as suggested earlier call [tableViewObject reloadData];

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

Sidebar

Related Questions

I want to create some tests for my app and I have the following
I have the following problem: Within a stylesheet document I want to create an
I have the following scenario, I want to create a DataGrid and then populate
I have following problem. I want to create a file system based session storage
I have following xml and I want to fetch the value of node which
I have following LINQ statement and I want to rewrite it using extension methods.
I have following code and i want to pass additional parameter in JSON.getJSONfromURL() method
for example I have the following: I want to go through each div class
I want the following functionality using php I have a csv file. Each file
i have following urls, which i want to find a string and remove that

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.