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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:54:37+00:00 2026-05-17T00:54:37+00:00

I have created sample application that insert 12 rows in tableview.And inserted fine.When after

  • 0

I have created sample application that insert 12 rows in tableview.And inserted fine.When after inserted my rows i dont want any changes in text during scrolling of tableview.So i checked with indexpath row has value of UITableViewCell , if it has values means return that cell otherwise we created new UITableViewCell.

My sample code is below

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;

}

// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section  {
NSLog(@"GlobalCount = %d",GlobalCount);
return GlobalCount;

}

- (UITableViewCell *)tableView:(UITableView *)tv cellForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewCell *obj = (UITableViewCell*)[tableView cellForRowAtIndexPath:indexPath];
if(obj!=nil)
{
    NSLog(@"cell indexpath row = %d",indexPath.row);
    NSLog(@"cell text = %d",obj.textLabel.text);
    return obj;
}

else {
    NSLog(@"obj==nil");
}


static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tv dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
    cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    cell.selectionStyle = UITableViewCellSelectionStyleNone;

}

if([DataTable count]>0)
    cell.textLabel.text = [DataTable objectAtIndex:0];
// Configure the cell.
return cell;

}

What my objective is , i dont want update any text (or UITableViewCell)for already created indexpath rows(of cell).So i can check this in cellForRowAtIndexPath , but it always return nil.If i am missing anything ?

I checked using this line

UITableViewCell *obj = (UITableViewCell*)[tableView cellForRowAtIndexPath:indexPath];
if(obj!=nil)

Plz help me?

Thanks in advance……

  • 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-17T00:54:38+00:00Added an answer on May 17, 2026 at 12:54 am

    Let the table view decide id it need to update the cell or not. Just remove all the firsdt part of your code and everything will run smoothly.

    Don’t hesitate to read the UITableView doc.

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

Sidebar

Related Questions

I created a sample application that where I have a basic fullscreensize UIImageView set
I have created a sample java socket application. I used Socket s = new
I have a view that I created in my GWT application and I would
I have created sample application which can call show all contacts (phone numbers). But
I have created a sample application suing Application cache, My some files are located
I have a requirement to create a simple windows forms application that allows an
I have created a simple blog application with Ruby on Rails. The applications consists
I have created a simple win 32 application..in which it has a textbox and
We have created a simple wix project for a basic windows application. Everything builds
I have created blank C#/XAML Windows 8 application. Add simple XAML code: <Page x:Class=Blank.MainPage

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.