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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:15:02+00:00 2026-06-17T10:15:02+00:00

When I add custom controls to a UITableViewCell (by dragging UILabel onto table cell

  • 0

When I add custom controls to a UITableViewCell (by dragging UILabel onto table cell in storyboard), the content is invisible at runtime. When I tap on the table row (to select it) the content appears, but white.

Project setup: (summary: create super-minimal storyboard project with a UITableView and a few lines of code to create content):

New project, single view application, Xcode 4.5.2, use storyboards. That creates a project targeted at iOS 6.

Drag a table view controller onto storyboard, which creates a view, the UITableView it contains, and the default UITableViewCell inside that table.

Set my table view controller as initial scene.

Set a reuse identifier string for the UITableViewCell (in storyboard editor).

Create a new file, subclass of UITableView, fill in some minimum stock data stuff to get a few rows to populate with “line XX” data text.

Run project. Data appears as expected, several rows of data saying “Line 0”, “Line 1”, etc. No issues.

Now, I drag a label onto my table cell in the story board. I change nothing about the properties. I leave the label text just saying “Label” in black letters.

See image at: http://www.codexlumen.com/issue/storyboard.png

Run project again.

What I expect: my table rows now have “Label” appearing in the lines, in black text.

What I actually see: exactly the same as before. The “Label” text does not appear, at all.

Now, here’s the fun part:

Still running, I tap on a table row to select it. Now the row is hilighted in blue, and “Label” appears in white at the position where I placed the label control.

See image at: http://www.codexlumen.com/issue/hilight.png

So the UILabel is there, it’s just not getting drawn in the non-hilighted rows…

Have no idea why.

Some other comments:

  • I am not using any kind of custom table cell subclass.
  • I didn’t add anything to the project or take any steps not mentioned above.
  • I didn’t change the properties of the storyboard’s UITableView or UITableViewCell objects except to set the reuse identifier string and to drag the UILabel onto the cell
  • I tried running both on my 4s and int he simulator (with simulator set to various device/os configurations)
  • I’ve tried changing the label properties (black background, green text, etc). No effect. Visual behavior is identical no matter what properties I set (though “Label” is bigger if I enlarge text)

This is 100% storyboards. I’m creating no UI objects in code. The only reference to UI in code is the code to populate table cell, shown below:

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"MyCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier forIndexPath:indexPath];

    cell.textLabel.text = [NSString stringWithFormat:@"Line %i", indexPath.row];

    return cell;
}
  • 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-06-17T10:15:03+00:00Added an answer on June 17, 2026 at 10:15 am

    I see your problem. You accessing properties of standard UITableViewCell (i.e. cell.textLabel) while using custom cell. Just kill 3rd line to see the difference. I’d suggest you create your own outlets for every label you need and not use standard ones.

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

Sidebar

Related Questions

I am trying to add a custom view control to a custom UITableViewCell which
I'd like to add custom controls to the mediaPlayer control view much as this
I have stack panel with custom controls in it. User can add or remove
I'm trying to add some custom controls to Google Maps and style them with
I'm using a winForm. I have 2 custom controls that I want to add
I'm trying to add custom controls to a Google map using the API. I
I am making a custom control I need to add some default keybindings, microsoft
I have created a Dynamic View Panel custom control and want to add a
Can I add new method to aspxclienttextbox control? I'm doing custom control on the
I am trying to add a custom data-required attribute to an asp Checkbox control,

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.