title: objective-c : When you click on the first cell, an issue occurs in which the last cell is selected
body: <p>Currently, a total of three cells are created. Strangely, when you click on the first cell, the last cell is clicked.</p>
  
  <p>To check the log In this section</p>
  
  <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath 
  </code></pre>
  
  <p>I checked the cell I clicked by writing the log as below.</p>
  
  <pre><code>NSIndexPath *c = [_tableView indexPathForSelectedRow];
  NSLog(@"LOG 3 : %@", c);
  </code></pre>
  
  <p>First cell click :</p>
  
  <pre><code>LOG 3 : &lt;NSIndexPath: 0xc000000000000016&gt; {length = 2, path = 0 - 0}
  </code></pre>
  
  <p>second cell click :</p>
  
  <pre><code>LOG 3 : &lt;NSIndexPath: 0xc000000000200016&gt; {length = 2, path = 0 - 1}
  </code></pre>
  
  <p>When the third cell is clicked:</p>
  
  <pre><code>LOG 3 : &lt;NSIndexPath: 0xc000000000400016&gt; {length = 2, path = 0 - 2}
  </code></pre>
  
  <p>I have confirmed that this is the log.</p>
  
  <p>Although it looks normal,
  Actually the simulator confirms that if you click cell 0, the third cell is selected and the third cell is changed to light gray background.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
  </code></pre>
  
  <p>I think the process of creating a cell in this part is wrong.</p>
  
  <p>Currently I am creating a cell as shown below.</p>
  
  <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  {
  
      TableViewCell *cell;
  
      for (int i = 0 ; i &lt; fileCount; i++) {
          indexPath = [NSIndexPath indexPathForRow:i inSection:0];
          cell = [tableView dequeueReusableCellWithIdentifier:@"TableViewCell" forIndexPath:indexPath];
  
          cell.fileName.text = [NSString stringWithFormat:@"%@",[_fileList[i] valueForKey:@"name"]];
          cell.fileDate.text = [NSString stringWithFormat:@"%@",[_fileList[i] valueForKey:@"date"]];
          cell.fileSize.text = [NSString stringWithFormat:@"%@",[_fileList[i] valueForKey:@"size"]];
      }
  
      return cell;
  }
  </code></pre>
  
  <p>The reason I do this is because the _fileList Array contains several Dictionary with name, date, size pairs
  So we were creating a cell using the for statement.</p>
  
  <p>For some reason, when you click on the first cell, will the last cell be a click?</p>