title: How to change the state of the image in cell made in xib?
body: <p>There is a <code>TableView</code> and a "Locked" image, how do I get <code>alpha = 0</code> when I click cell 1 in cell 2? There is the <code>cellForRowAt</code> function:</p>
  
  <pre><code>func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCell(withIdentifier: "tableViewCell", for: indexPath) as! TableViewCell
  
      cell.commonInit("got_\(indexPath.item)", title: titleLessons[indexPath.item], sub: summary[indexPath.item], imageLock: imageZ[indexPath.item])
  
  
      return cell
  }
  </code></pre>
  
  <p>There is the <code>didSelectRowAt</code> function:</p>
  
  <pre><code>func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
      if unlockedRows.contains(indexPath.row) {
          let nextIndex = indexPath.row + 1
          if nextIndex &lt; pdfArr.count {
              let vc = DetailLessonsVC()
              let ce = TableViewCell()
  
              vc.pdfTitle = pdfArr[indexPath.row]
  
              vc.numberList = pdfArr[indexPath.row]
  
              vc.linkList = link[indexPath.row]
  
              unlockedRows.append(indexPath.row + 1)
  
              self.navigationController?.pushViewController(vc, animated: true)
              self.tableView.deselectRow(at: indexPath, animated: true)   
          }
          print("no")
      }     
  }
  </code></pre>
  
  <p><code>TableViewCell</code> is xib's custom class.</p>