title: Making iOS Gallery - UICollectionView reusability
body: <p>I am new to iOS developing and I am using Swift 3.</p>
  
  <p>In my gallery app when user selects a cell, the picture inside that cell displays in a UIImageView above and the cell itself becomes bordered red to show that it is selected right now. However, when I scroll up or down and as soon as the selected cell is destroyed UICollectionView selects another cell from the visible ones.</p>
  
  <p>I want to know how can I restore the selected state of a cell when it reused and prevent UICollectionView from doing that. In conclusion I want to know how to prevent from cell reusabilities effects on selection state.</p>
  
  <p>Sorry for my bad English, not a native speaker.</p>