---
title: "Unable to display text using cell.detailTextLabel.text"  
description: "Unable to display text using cell.detailTextLabel.text"  
author: "Anonymous User"  
published: 2015-11-17  
updated: 2015-11-17  
canonical: https://www.mindstick.com/forum/33602/unable-to-display-text-using-cell-detailtextlabel-text  
category: "iphone"  
tags: ["iphone", "ios", "objective c"]  
reading_time: 1 minute  

---

# Unable to display text using cell.detailTextLabel.text

I have getting [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) with this [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) that is not displaying [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) in [table view](https://www.mindstick.com/forum/33654/send-table-view-cell-value-on-button-action-in-ios) cell.\
here is the code:.\

```
cell.textLabel.text = [arrayObj1 objectAtIndex:indexPath.row];  cell.detailTextLabel.text = [arrayObj2 objectAtIndex:indexPath.row]];  NSLog(@"%@", [arrayObj1 objectAtIndex:indexPath.row]);
```

but, NSLog displays the [value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages) of arrayObj1, then why table view cell not displaying the text.\
[Please suggest](https://answers.mindstick.com/qa/43506/please-suggest-the-bathing-date-at-kumbh) me the reason, why it's not working?

## Replies

### Reply by Tarun Kumar

[Table](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) [view](https://yourviews.mindstick.com/view/84701/layoffs-in-google-india-2023-view) cell provides styles for setting text label in Right and Left alignment:\
**These are the two styles:**\
UITableViewCellStyleValue1 - it will set label on the left side of the cell with left-aligned and black text, on the right side is a label that has smaller blue text and is right-aligned.\
UITableViewCellStyleValue2 - it will set label on the left side of the cell with right-aligned with blue, on the right side of the cell is another label with smaller text that is left-aligned and black.

set these styles in your code like this:

```
UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1                         reuseIdentifier:simpleTableIdentifier];
```


---

Original Source: https://www.mindstick.com/forum/33602/unable-to-display-text-using-cell-detailtextlabel-text

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
