# Configure multiple labels in function

**URL:** <https://forums.kodeco.com/t/configure-multiple-labels-in-function/16540>\
**Category:** iOS Apprentice\
**Created:** [June 27, 2016, 12:44am UTC](https://forums.kodeco.com/t/configure-multiple-labels-in-function/16540 "2016-06-27T00:44:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonny](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jonny/32/79544_2.png) [@jonny](https://forums.kodeco.com/u/jonny)\
**Post date:** [June 27, 2016, 12:44am UTC](https://forums.kodeco.com/t/configure-multiple-labels-in-function/16540/1 "2016-06-27T00:44:57Z")

</div>

Hi

I have adjusted the function configureCell as below and given my label the tag of 3000.

```
    // update label via tag
func configureTextForCell(cell: UITableViewCell, withPlayer player: Player){
    let jerseyLabel = cell.viewWithTag(3000) as! UILabel
        jerseyLabel.text = String(player.jerseyNumber)
    
    let label = cell.viewWithTag(2000) as! UILabel
    label.text = player.firstName + " " + player.secondName
}

```

I am getting `fatal error: unexpectedly found nil while unwrapping an Optional value` when I access this tableView. I understand the error, but not why I get it in this case? The textfield exists and the palyers, first name, last name and jersey number exist?? (the tag for 2000 works fine) 😕

---

<div class="post-metadata">

**Author:** ![jonny](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/jonny/32/79544_2.png) [@jonny](https://forums.kodeco.com/u/jonny)\
**Post date:** [June 27, 2016, 2:29am UTC](https://forums.kodeco.com/t/configure-multiple-labels-in-function/16540/2 "2016-06-27T02:29:17Z")

</div>

I think this was my fault in that my storyboard didn’t save
