DetailTextLabel on cell created in dynamic prototype storyboard only appears after cell is selected?

I am adding a cell as shown below. Before you select a cell, can only be seen textLabel

after selection detailTextLabel

. Why detailTextLabel

not on screen from the start?

override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

    let cell = tableView.dequeueReusableCellWithIdentifier("ooo", forIndexPath: indexPath) as UITableViewCell
    cell.textLabel!.textColor = UIColor.whiteColor()
    cell.textLabel!.text = "asdf1"
    cell.detailTextLabel!.textColor = UIColor.whiteColor()
    cell.detailTextLabel!.text = "asdf2"

    return cell
}

      

+3
ios uitableview interface-builder storyboard


source to share


No one has answered this question yet

See similar questions:

32
UITableViewCell subtitles won't update

or similar:

61
How to detect a cell of a tableView being touched or clicked in swift
21
Expand and collapse table cells
3
How to fix "method does not override any method from its superclass" ??
2
TableView does not display text with JSON data from API call
1
MKSlidingTableViewCell does not support ASyncDisplayKit
0
TableViewCell table height
0
thread 1: exc_bad_instruction (code = exc_1386_invop, subcode = 0x0)
0
Count the number of values ​​in a dictionary
0
after adding header cells are not displayed
-1
How to display JSON array in UITableView



All Articles
Loading...
X
Show
Funny
Dev
Pics