Returns the secondary label of the table cell if one exists. (read-only)
Questions tagged [detailtextlabel]
44 questions
59
votes
6 answers
Why is detailTextLabel not visible?
detailTextLabel is not visible (code below). Can you tell me why?
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString…

Chatar Veer Suthar
- 15,541
- 26
- 90
- 154
37
votes
13 answers
UITableViewCell not showing detailTextLabel.text - Swift
The detail (subtitle) text does not appear. The data are available, though, because when a println() call is added, it prints Optional("data") to the console with the expected data. In the storyboard, the UITableViewController is set to the proper…

kurple
- 411
- 1
- 5
- 12
9
votes
3 answers
IOS Multiple right and left align on same line
I want to write on the same line of my tableview cell detailTextLabel.
For example
Left string right string.
I'm doing this :
NSMutableAttributedString *descriptionAttribute = [[NSMutableAttributedString alloc]…

user3433920
- 131
- 1
- 6
6
votes
5 answers
Why is my UITableViewCell not showing detailTextLabel in ANY style?
This one has me pulling my hair out. I'm just trying to create a table with the UITableViewCellStyleSubtitle style, with text and detail. But the detail isn't showing up. Usually this is because someone has forgotten to initialize the cells with…

Joe Strout
- 2,634
- 2
- 28
- 39
5
votes
3 answers
how to make text bold for detailedTextLabel in swift
cell!.textLabel?.text = vehicle["vrn"].string
cell?.detailTextLabel?.text = stateString
I want to display stateString as bold and also tried to use textLabel instead of detailedText but it did not work.

Raj
- 61
- 3
- 7
5
votes
2 answers
A text label in the tableview is too long which affects the right detail (detailTextLabel) to be covered or not shown
I have set a text for that cell but however, the text that it is shown is too long which affects the right detail text to be covered or not shown.
I can't change it as I need the name in the next viewcontroller. Is it possible to enable it to just…

stan_dev
- 81
- 2
- 8
3
votes
1 answer
Vertical align UITextlabel in UITableViewCell
I'm having issues with the vertical alignment in a UITableViewCell.
I'm using a right detail UITableViewCell in which the detailTextLabel contains multiple lines of text.
By setting the number of lines to zero I've managed to get the detailTextLabel…

Berendschot
- 3,026
- 1
- 21
- 43
3
votes
1 answer
Set detailtextlabel of static cell programmatically
I have a tableView with a few sections and I have it set for static cells instead of dynamic prototypes. The problem is that I can't set the detail text label of a static cell programmatically or at least I don't know how. Is it possible ? The only…

califrench
- 429
- 6
- 13
2
votes
1 answer
iPhone Weird behavior UITableView cells
I have a settings view with 3 sections. Some cells have different styles: Default or Value1. When I swipe fast up or down, or change view and come back, the text supposed to be in a cell (for example the detailTextLabel in my cell with StyleValue1)…

Dachmt
- 2,079
- 4
- 29
- 45
2
votes
1 answer
detailTextLabel of cell does not show in swift 3
Although setting subtitle style for cell, but detailTextLabel has not still showed.
let cellIdentifier = "homeFeedItem"
let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier) ?? UITableViewCell(style: .subtitle, …

Ryan Tran
- 467
- 6
- 16
2
votes
3 answers
How do I change the colour of the DetailTextLabel using Monotouch?
I seem to be unable to change the colour of the DetailTextLabel in a UITableView.
I can change the font and size but not the colour. Here is my code:
public override UITableViewCell GetCell (UITableView tableView, MonoTouch.Foundation.NSIndexPath…

Tanis Draven
- 425
- 1
- 4
- 14
1
vote
1 answer
Setting Line Height on UITableViewCell's detailText
Here I'm using the default UITableViewCell & the thing I don't like is that the detailedText is too close to the textLabel so I wanted to add some spacing between them, but I cannot find how to do that. Any suggestsions?

Kex
- 776
- 10
- 22
1
vote
3 answers
UITableView cell detailTextLabel text alignment not working
I'm trying to format the position of numbers in a UIViewController's detailTextLabel property. The numbers in the detailTextLabel part of the UIViewTable are too far to the right (as in the image).
I've tried:
cell.detailTextLabel?.textAlignment =…

Tirna
- 383
- 1
- 12
1
vote
3 answers
Why does [cell.detailTextLabel setBackgroundColor:[UIColor blackColor]]; not work?
[cell.detailTextLabel setBackgroundColor:[UIColor blackColor]];
doesn't work. Any way to make it work?
Thanks

Thomas Clayson
- 29,657
- 26
- 147
- 224
1
vote
2 answers
Set a custom cell style with right detail ,but it does not show detailTextLabel?
I'm using Xcode7.2.1 iOS9.2 SDK.
set the custom cell style with Right detail
Register cell nib:
Code:
self.TbuserList.registerNib(UINib.init(nibName: "UserCell", bundle: NSBundle.mainBundle()), forCellReuseIdentifier: "idUserList")
set the cell…

Levi Han
- 21
- 5