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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:35:14+00:00 2026-05-23T15:35:14+00:00

I am using custom UITableview concept to show data in cell of tableview. My

  • 0

I am using custom UITableview concept to show data in cell of tableview. My custome uiTableview name is CustomeUITableView.h,CustomeUITableView.m and CustomeUITableView.xib file. This file is consisting following code.

//header file code

@interface CustomTableCellview : UITableViewCell {

UILabel *titleOfPost;
IBOutlet  UILabel *userProfileName;
}

@property(nonatomic,retain) IBOutlet UILabel *titleOfPost;


- (void)setTileOfPost:(NSString *)_text;
- (void)setUserName:(NSString *)_text;
@end

// some important part of class file code

- (void)setTileOfPost:(NSString *)_text{
titleOfPost.text = _text;
 }

- (void)setUserName:(NSString *)_text{

userProfileName.text = _text;

 }

// TableView code where cell is creating and function of cutome UITableview is calling

    static NSString *MyIdentifier = @"MyIdentifier";
MyIdentifier = @"tblCellView";

   CustomTableCellview *cell = (CustomTableCellview *)[tableView  dequeueReusableCellWithIdentifier:MyIdentifier];
  if(cell == nil) {
    [[NSBundle mainBundle] loadNibNamed:@"CustomTableCellview" owner:self options:nil];
    cell = tblCell; //IBOutlet CustomTableCellview *tblCell;

 }

[cell setTileOfPost:[tableList objectAtIndex:indexPath.row]];

[cell setUserName:[profileUserName objectAtIndex:indexPath.row]];

 return cell;    

This is calling well and my output is displaying data fine. But here is a bit mistake. I am calling function “setTileOfPost” and “setUserName” in each CELL load. This is making large function calling. I want to fetch all title of text in one call of function. I don’t want to use calling function again and again. I stored value in “tableList” and this is extern array defined in main.m file so I can use this array anywhere in application.

How to grab all value in single function call?
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-23T15:35:15+00:00Added an answer on May 23, 2026 at 3:35 pm

    tableList and profileUserName are of type NSArray or NSMutableArray i suppose. What you can do is in your viewdidLoad method create a copy of these arrays as the data source.
    And in cellforrowatindexpath you can directly access these copies.

    [cell.title setText:[tableListCopy objectAtIndex:indexPath.row]];
    

    I hope you get the point here. You are having a local copy of the datasource of the tableview.

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

Sidebar

Related Questions

How to show a detail disclosure button to the uitableview without using the custom
i am using custom cell in uitableview cell.I am giving button on the right
I have a TableView loading a custom cell and loading the data from a
I am using custom cell and adding tableview programmetically. I am trying to implement
I've a custom table view cell that I created using XIB: I've also linked
I'm using custom headers for my tableview... - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { CustomHeaderController
I am using a custom class as the delegate and datasource on a UITableView.
I'm using a UITableView to display custom cells created with Interface Builder. The table
I am using UILabel for custom cells in my UITableView . Heres all the
I have a UITableView which loads data from XML using the below code. It

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.