# Checklists App - ConfigureCheckmarkForCell Method

**URL:** <https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434>\
**Category:** iOS Apprentice\
**Created:** [June 1, 2016, 9:09am UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434 "2016-06-01T09:09:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohan314](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rohan314/32/33446_2.png) [@rohan314](https://forums.kodeco.com/u/rohan314)\
**Post date:** [June 1, 2016, 9:09am UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434/1 "2016-06-01T09:09:50Z")

</div>

Hello,

I have a question about the ConfigureCheckmarkForCell Method that is described in the checklists tutorial:  
(at the time of posting this I have just reached the ‘Arrays’ part of the tutorial)

This method is called by the tableView(cellForRowAtIndexPath) method. This method returns a cell, and passes the cell to the ConfigureCheckmark method. I understand that swift is pass-by-value, and not reference, unless you use the inout keyword. Since the inout keyword is not used, how is the cell that the tableView(cellForRowAtIndexPath) method returns, modified?

Another somewhat related question: the tableView(didSelectRowAtIndexPath) method does not return a cell. It modifies a cell given by the cellForRowAtIndexPath method, so does this method return a value by reference?

Essentially, I am having trouble understanding how manipulating the local copies of the cells is being reflected in the view controller. Thanks!

---

<div class="post-metadata">

**Author:** ![narrativium](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/narrativium/32/110937_2.png) [@narrativium](https://forums.kodeco.com/u/narrativium)\
**Post date:** [June 1, 2016, 4:14pm UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434/2 "2016-06-01T16:14:36Z")

</div>

Swift has value types (structs and enums) and reference types (classes). UITableViewCell is a class; it’s a reference type.

---

<div class="post-metadata">

**Author:** ![rohan314](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rohan314/32/33446_2.png) [@rohan314](https://forums.kodeco.com/u/rohan314)\
**Post date:** [June 2, 2016, 6:45pm UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434/3 "2016-06-02T18:45:32Z")

</div>

I see, makes perfect sense. and every time an element on the screen is updated (for example, a cell checkmark is turned off or on), does the system know to automatically refresh the screen? Thank you!

---

<div class="post-metadata">

**Author:** ![hollance](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/hollance/32/109009_2.png) [@hollance](https://forums.kodeco.com/u/hollance)\
**Post date:** [June 2, 2016, 7:55pm UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434/4 "2016-06-02T19:55:23Z")

</div>

Yes, if you’re changing something in response to a “didSelectRowAtIndexPath”, i.e. a tap from the user, iOS will redraw the screen.

(If you’re changing something not in response to a tap then you have to tell the table view to redraw. This is covered later on in the iOS Apprentice.)

---

<div class="post-metadata">

**Author:** ![rohan314](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/rohan314/32/33446_2.png) [@rohan314](https://forums.kodeco.com/u/rohan314)\
**Post date:** [June 2, 2016, 7:56pm UTC](https://forums.kodeco.com/t/checklists-app-configurecheckmarkforcell-method/15434/5 "2016-06-02T19:56:59Z")

</div>

Great, that makes sense. Thank you very much
