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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:14:03+00:00 2026-05-25T00:14:03+00:00

I have been playing around with tableviews for the past few days trying to

  • 0

I have been playing around with tableviews for the past few days trying to get used to them, today I have been trying to create a custom uitableviewcell, I am working from the Table View Programming Guide in the apple documents and have this weird problem with something I am trying to do.

I have set up a custom cell nib file, it has two labels on it that both have tags (0 and 1) I have changed the File owners class to the nib that will be using it.

from there I have started programming the tableView:cellForRowAtIndexPath: method that displays my custom cells inside the tableview however as you will see, only my first label is showing when I assign it a string and I just don’t know why…

Custom cell Nib
enter image description here

tableView:cellForRowAtIndexPath: method

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

        UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
        if (cell == nil) {
            //cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue2 reuseIdentifier:CellIdentifier] autorelease];
            [[NSBundle mainBundle] loadNibNamed:@"ManufactureSearchCell" owner:self options:nil];
            cell = vehicleSearchCell;
            cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
            self.vehicleSearchCell = nil;
        }
        // Configure the cell...
        cell.selectionStyle = UITableViewCellSelectionStyleNone;

        if(indexPath.section == 0)
        {
            if(indexPath.row == 0)
            {
                UILabel *label;
                label = (UILabel *)[cell viewWithTag:0];
                label.text = [[NSString alloc] initWithString:@"Manufacture :"];

                label = (UILabel *)[cell viewWithTag:1];
                label.text = [[NSString alloc] initWithString:@"empty"];
            }
            else if(indexPath.row == 1)
            {
//.....

Any help would be appreciated 🙂

  • 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-25T00:14:04+00:00Added an answer on May 25, 2026 at 12:14 am

    Beware using viewWithTag and 0. That is the default tag for all views, so double check you are actually getting the label you want back from that instead of the cell’s background view, or accessory view, or any other default view added to the cell. It can cause problems.

    If you are reusing the cell, I’d recommend creating a custom UITableViewCell subclass and link them through IB. If you are not reusing that cell, and want it to display only once, definitely take up Karoly’s suggestion to just have those labels as IBOutlets.

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

Sidebar

Related Questions

I have been playing around with Google Apps Script today and I am trying
I have been playing around with in app purchases for a few days, everything
I have been playing around with JMX for the last few days and although
I have been playing around with NSURLConnection. Now I'm trying to grab some data
I have been playing around with GC.GetTotalMemory(). When I create a local variable of
I have been playing around with a few ways to batch insert a list
I have been playing around with this and wanted to get a second opinion.
I have been playing around with Object.create in the EcmaScript 5 spec, and I
I have been playing around with Umbraco 5 for some days now. I have
I have been playing around with jqgrid, and have the following question. To get

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.