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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:41:03+00:00 2026-06-04T13:41:03+00:00

I making an app with a table view and a data source (core data).

  • 0

I making an app with a table view and a data source (core data). In this table i group several tasks ordered by date, and i have this segmented control.
I want the table to only load the tasks later or equal than today’s date, when the user taps the second segment i want to show all tasks, if he taps the first segment the table must only show the later dates tasks again.

The problem is:

1 – I’m using fetchedResultsController associate with a indexPath to get the managed object.

2 – I use the insertRowsAtIndexPaths:withRowAnimation: and deleteRowsAtIndexPaths:withRowAnimation: methods to make the cells appear and disappear. And this mess with my indexPaths, if i want to go to the detail view of an specific row it is associate with a different indexPath, after delete the rows.

This problem was fixed by a method i did, but i still have other problems of indexPaths and cells, and it seems to me that is gone be me messy to each problem a fix.

There is a simple way to do that?

I tried just to hide the cells instead of delete, it works just fine, but in the place of the hidden cells was a blank space, if there is a way to hide these cells and make the non-hidden cells occupy the blank space i think that will be the simplest way.

Anyone can help me?

  • 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-04T13:41:05+00:00Added an answer on June 4, 2026 at 1:41 pm

    set the height of the cell to 0 when it hides, and set the height back to the original value when it appears.

    TableViewController.h

    @interface TableViewController{
    CGFloat cellHeight;
    }
    

    TableViewController.m

    - (void)cellHeightChange{
    //if you need hide the cell then
    cellHeight = 0;
    cellNeedHide.hidden = YES;
    //if you need hide the cell then
    cellHeight = 44; // 44 is an example
    cellNeedHide.hidden = NO;
    }
    
    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath;
    {
        switch (section) {
        // for example section 0 , row 0 is the cell you wanna hide.
        case 0:
            switch (row) {
                case 0:
                return cellHeight;
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making an app and i have a view controller with a UISegmentedControl, and
I'm making an app that has a view with UITableView with UISearchDisplayController . Data
I am making an nav based app. in my table view i am parsing
OK, i'm making an app that pulls down rss feeds, the initial table view
I am making an iPhone app. Table view has 3 views:(1) muscles -> (2)
I have several NSFetchedResultsControllers throughout my app, and in every view controller, I implement
I'm making this app with a tableview and stuff. I want to make a
I have a UITableView and basically I'm making some in app settings, and if
I'm having some trouble with an iPhone app that I'm making. I have two
Recently i am making an app on facebook. So i have use facebook api.

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.