Questions tagged [detailtextlabel]

Returns the secondary label of the table cell if one exists. (read-only)

44 questions
1
vote
2 answers

Swift UITableView didSelectRowAtIndexPath bug

I have a UITableView with the subtitles hidden but set up where when someone selects a cell it shows that cell's subtitle. This works fine except that after tapping any cell to reveal its subtitle if you scroll down you will find that every 12 cells…
1
vote
1 answer

App crashes if setting detailTextLabel of UITableViewCell

I'd like to set a value in the datailTextLabel of a UITableViewCell. If the code runs, the app crashes. This is the error: fatal error: unexpectedly found nil while unwrapping an Optional value This is the method in which the error takes place: func…
pablo
  • 61
  • 1
  • 1
  • 6
1
vote
2 answers

TextLabel shifts up when detailTextLabel becomes multiline

i'm currently making an app where the suer selects an MKMapView annotation and then the title of the annotation(pin) is set to a detailtextLabel in a Right Detail UITableViewCell. My Problem is that when the text is large, the detailTextLabel…
virindh
  • 3,775
  • 3
  • 24
  • 49
1
vote
1 answer

Update detailTextLabel outside of cellForRowAtIndexPath?

I'm using dynamic cells with reusable prototypes and have always set up the cells in cellForRowAtIndexPath. For one of the cells I'd like to update the detail text label numerous times (a test is being run, and I want to update the user as each…
Dan
  • 2,304
  • 6
  • 42
  • 69
1
vote
1 answer

real time update plist populate UITableView

Im trying to create an application that will show in a table 3 floors and in the detailTextLabel show how many computers are available in those floors. For now I dont have the realtime data but I want to just keep some fake fixed data for now and be…
Adilp
  • 429
  • 1
  • 7
  • 21
1
vote
1 answer

Saving current date in TableView subtitle issue

I trying to log date and time in the subtitle of the TableView I have used an array for the subtitle as I did for the text field but it didn't work for the subtitle. Am I doing something wrong? The code I have added for the subtitle pointed with…
Luai Kalkatawi
  • 1,492
  • 5
  • 25
  • 51
0
votes
3 answers

Can you display a small image in a detailTextLabel cell?

So I was wondering if it is possible to display a small image in a detailTextLabel of a cell? (I'm getting the image from a URL) I tried it with: NSString *thumbs = [NSString stringWithFormat:@"%@", TableText3]; cell.detailTextLabel.text =…
Blade
  • 1,435
  • 1
  • 14
  • 22
0
votes
2 answers

Shrink custom textLabel and detailTextLabel in custom UITableViewCell

I'm using a slightly customized version of Loren Brichter's Fast Scrolling script and I'm having a problem where the labels in the cells don't stop if they reach the end of the cell. When programming table views the standard way, if the textLabels…
wstr
  • 910
  • 2
  • 13
  • 23
0
votes
1 answer

tableView cell.detailTextLabel.text returns nil

I try to set a string to my detailTextLabel in a tableView but it's returning nil. I have read other posts where I am not the first one but I cannot understand what is going wrong in my case. I am using Swift 4. func tableView(_ tableView:…
Trichophyton
  • 625
  • 5
  • 21
0
votes
1 answer

searching UITableView detailTextLabel and textLabel

I am using the same code displayed in this Stackoverflow URL How do I link the search bar to display results in swift/xcode and I am wondering if there is also a way to search the detailTextLabel seeing as I have included a subtitle in the cells. …
user3203552
  • 53
  • 1
  • 1
  • 5
0
votes
1 answer

How to add 2 detailTextLabels to a cell in Swift?

I have a Table View Controller Swift project in Xcode. I have made a detailTextLabel for the deadline. I would want to add notes as this to appear immediately under the deadline(NSDate) as a second detailTextLabel(NSString), something like built-in…
Razvan Julian
  • 59
  • 3
  • 14
0
votes
1 answer

Add label text in detailTextLabel as well as text pulled from JSON

I'm trying to enter static text in a detailTextLabel which gives the information that is being pulled in some context. At the moment I have [[cell detailTextLabel] setText: [[artist valueForKey:@"listeners"] description]]; Which works great for…
0
votes
1 answer

How do I show a hidden subtitle in a UITableView when selected?

Is there a way to hide the subtitles of all the cells until you select a cell - then it only shows you that cell's subtitle? I tried the following code - which successfully hides all the subtitles but fails to show one when I select a cell: if…
Tommy Draughn
  • 179
  • 1
  • 12
0
votes
1 answer

Trouble adding buttons to UITableViewCell in Swift

How can I add a UIButton into a UITableViewCell? I am having trouble doing this in Storyboards.
kurple
  • 411
  • 1
  • 5
  • 12
0
votes
1 answer

Find out UITableViewCells with detailTextLabel

I'd like to find out all UITableViewCells (number varies) which have an detailTextLabel with the text "Done" in it. How can I do this in Swift?
hom
  • 25
  • 2
  • 6