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


source to share





All Articles