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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:45:56+00:00 2026-05-27T17:45:56+00:00

In my iPhone application… In table view I am deleting the row… updating the

  • 0

In my iPhone application…

In table view I am deleting the row…

updating the array from which I am feeding the table….

Reloading to data row….

enter image description here

x

Yes but Data which is deleted is proper..

Cell for Row at Index Path….

I have just added One Label to the row…
While deleting the row

I am just deleting the data from array

And Updating the count of the rows(decrementing)…

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

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


            //Get the Log Id for the sections. From Section Array
            int logID=0;
            if(indexPath.row==0)
            {
                NSLog(@"Time Array %@",timeArray);
                  logID=[[[sectionArray objectAtIndex:indexPath.section] valueForKey:@"logID"] intValue];
                  NSPredicate *p=[NSPredicate predicateWithFormat:@"logID==%d",logID];
                  fillRows=nil;
                  fillRows= [[timeArray filteredArrayUsingPredicate:p] mutableCopy];
            }

        //Show Current Time.
        //"If condition for not to go for Array Index Out of Bound".
        if(indexPath.row<[fillRows count])
        {
        //Log CurrentTime    
            cell.textLabel.text=[[fillRows objectAtIndex:indexPath.row] valueForKey:@"logCurrentTime"];
        //Log Duration.   
            UILabel *lblDuration=[[[UILabel alloc] initWithFrame:CGRectMake(110, 11, 60, 21)] autorelease] ;

      lblDuration.text=[[fillRows objectAtIndex:indexPath.row] valueForKey:@"logDuration"];
            [cell.contentView addSubview:lblDuration];
        }

            return cell;
        }

EDIT ::Question of Overlapping the Labels Which has been patiallly solved.
Because now the label is not overlapped but
When I remove any row then that rows’ label remain same
—> the last row is not shown in the table.

See this link Answer

  • 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-27T17:45:56+00:00Added an answer on May 27, 2026 at 5:45 pm

    The problem is that you keep adding a new label to the cell each time the cell is drawn.

    try moving the following code into the if (cell == nil) {..} block

    UILabel *lblDuration=[[[UILabel alloc] initWithFrame:CGRectMake(110, 11, 60, 21)] autorelease] ;
    [cell.contentView addSubview:lblDuration];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an iPhone application and I have a table view that is
My iphone application captures the realtime data from camera using AVFoundation's AVCaptureSession. I'm able
I have iphone application in which I am downloading images from server & displaying
When iPhone application go to applicationWillResignActive mode, I need to download the data from
My iPhone application connects to my PHP web service to retrieve data from a
My iPhone application downloads large files from the internet (videos, for instance). I'd like
I have an iPhone application where i download information from the internet and put
I have made an iphone application like flip cards in which values of cards
I have an iphone application in which in a button click i am showing
I have an iphone application in which in a button click i am showing

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.