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 7594347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T21:23:36+00:00 2026-05-30T21:23:36+00:00

I have this UITableViewController which i made a Static Cells using Interface Builder and

  • 0

I have this UITableViewController which i made a Static Cells using Interface Builder and three added different kind of cells.

The first cell is some kind of details, the last cell allows user input which in-turn gets show the center cell.

enter image description here

I want to reuse the center cell and add new ones as the user enters in the last comment box.

My problem is that, since it’s static cells, I can’t reuse the center cell alone I think. How can I solve it?

  • 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-30T21:23:38+00:00Added an answer on May 30, 2026 at 9:23 pm

    don’t use static cells. Static cells are not meant to be reused. With static cells you create a table solely in the xib.

    Create three different prototype cells and give them a different reuse identifier and use them like regular cells.

    Since your table is divided into sections just use the section information of the indexPath to return the correct cell.

    Something like this should work:

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
    {
        return 3;
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
    {
        if (section == 1) {
            return _objects.count;
        }
        return 1;
    }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
        UITableViewCell *cell = nil;
        if (indexPath.section == 1) {
            cell = [tableView dequeueReusableCellWithIdentifier:@"SecondCell"];
            // configure the mid cells
            NSDate *object = [_objects objectAtIndex:indexPath.row];
            cell.textLabel.text = [object description];
        }
        if (indexPath.section == 0) {
            cell = [tableView dequeueReusableCellWithIdentifier:@"FirstCell"];
            // configure first cell
        }
        else if (indexPath.section == 2) {
            cell = [tableView dequeueReusableCellWithIdentifier:@"ThirdCell"];
            // configure last cell
        }
        return cell;
    }
    

    have a look at the tableFooterView and tableHeaderView property too. Maybe you don’t need cells for the first and last item at all.

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

Sidebar

Related Questions

I have a UITableViewController which creates dynamically re-sizeable cells. The cell changes the size
I have a custom subclass of a UITableViewController which has a editable cells in
I have a UITableViewController in my app, which is added to the view hierarchy
I have a UITableViewController , in which I added a UISearchBar as the tableHeaderView
I have a UITableViewController which has two sections. The first section shows a single
I have a custom class which is a UITableViewController, this is inside of a
I have four buttons, which have to push the same uiTableViewController, with different data
This is my first try into iPhone development and I have some UITableViewController s
I have a structure like this.... UITableViewController -> UITableViewCell -> UIView I need the
I have this string 'john smith~123 Street~Apt 4~New York~NY~12345' Using JavaScript, what is the

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.