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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:54:52+00:00 2026-06-07T08:54:52+00:00

I need to implement two different index paths on my tableview in cellForRow at

  • 0

I need to implement two different index paths on my tableview in cellForRow at index path… One with data from my fetched results controller and another for simple text.

What is the best way to go about this.

  • 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-07T08:54:53+00:00Added an answer on June 7, 2026 at 8:54 am

    Im not exactly sure what your asking, but it sounds like you want a table with one section containing results from an NSFetchedResultController, and another section with data from some other source. This is easy to do. If your data can doesn’t need to be in multiple sections then it’s very easy, just get data from fetchedResultController for section 0, and something else for section 1.

    - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
        return 2;
    }
    
    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
        if(section == 0){    
            id  sectionInfo = [[fetchedResultsController sections] objectAtIndex:section];
            return [sectionInfo numberOfObjects];
         }else{
            return self.someArray.Count;
         }
    }
    
    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
         if(indexpath.section == 0){    
              static NSString *CellIdentifier = @"data cell";
              UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
               NSObject *foo = [self.fetchedResultController objectAtIndexPath:indexPath];
               //configure cell
              return cell;
          }else{
              static NSString *CellIdentifier = @"some other cell";
              UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    
               //configure cell
              return cell;
         }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i need to implement two different stylesheets in a single master page. one style
I need to start an Activity with two different Intent, can I define two
I need to implement two separate login/logout URLs for my Django app, for two
i need to implement this scenario Brief about that is have two java based
I need to implement different colors and background images for all UI elements in
I want to index two different OntModel and execute sparql queries on them. For
I need to represent a many-many object mapping between two different groups of objects
I have two different models that need saving; a TextFile object and a static
I have a controller with two render methods that take different arguments: class MyController
I need to implement a custom handler for MVC that gives me the first

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.