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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:05:46+00:00 2026-05-25T16:05:46+00:00

In My TableVIew Im loading Custome cell With Xib, For Every Entry Of CellForIndexPath,Cell

  • 0

In My TableVIew Im loading Custome cell With Xib, For Every Entry Of CellForIndexPath,Cell is recreated. how to avoid recreation of cell??

Iam new to IPhone ,Please 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-05-25T16:05:46+00:00Added an answer on May 25, 2026 at 4:05 pm

    when you load view from Nib then it will alloc memory every time when cellForRowAtIndexPath called so it is better way to just redraw cell instead of alloc memory every time.
    May below example will help you.

    Parametrically crate label in custom cell. like

    - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    if ((self = [super initWithStyle:style reuseIdentifier:reuseIdentifier])) {
    lblusername=[[UILabel alloc]initWithFrame:CGRectMake(70, 10, 150, 25)];
        lblusername.backgroundColor=[UIColor clearColor];
        lblusername.textColor=[UIColor colorWithRed:33.0/255.0 green:82.0/255.0 blue:87.0/255.0 alpha:1.0];
        [contentview addSubview:lblusername];
        [lblusername release];
     }
    return self;
    }
    

    And call custom cell using below listed code.

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
    {
    
    static NSString *CellIdentifier = @"Cell";
    
    LeaderboardCustomeCell *cell = (LeaderboardCustomeCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[LeaderboardCustomeCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
    }
    cell.lblusername.text=@"Hello";
    }  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm loading a view from a tableview touched cell that contains a photo that
I have a TableView loading a custom cell and loading the data from a
I am loading a tableview. Each cell of my tableview should have varying heights
I have a problem loading different nib files in one tableView. I saw this
hey people im having trouble with loading my array of strings into a tableview
I'm loading an image in to an UITableView through a simple cell.imageView.image = [UIImage
If I'm loading images from the phone into a TableView about 50-60 entries, which
How do you hide the tableView of TTTableViewController, while it's Loading? It's kinda annoying
I'm having trouble loading a detailed view from a TableView. The segue doesn't fire
In my UITableView , I want to show loading indicator in the last cell.

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.