title: Swift CollectionView Display Wrong
body: <p>I have a collection view in my app.
  I want to set each item to have a different color.
  I use a switch case, as follows.</p>
  <pre><code>switch indexPath.row {
          case 0: cell.label.text = &quot;0&quot;
              cell.label.textColor = .blue
          case 1: cell.label.text = &quot;1&quot;
          case 2: cell.label.text = &quot;2&quot;
          case 3: cell.label.text = &quot;3&quot;
          case 4: cell.label.text = &quot;4&quot;
          case 5: cell.label.text = &quot;5&quot;
          default: cell.label.text = &quot;6&quot;
          }
  </code></pre>
  <p>I have set the default color light gray to the label.
  But if I set case 0 to blue color, case 0 and 5 will display blue.
  I set case 1 to blue color, case 1 and 4 will display blue.</p>