NSIndexPath and IndexPath in Swift 3.0
<p>I have recently converted my code to Swift 3.0. My collection view and table view data source methods now contain <code>IndexPath</code> instead of <code>NSIndexPath</code> in their method signature. But still inside the method definition it is type casting IndexPath to NSIndexPath. i.e.</p>

<pre><code>func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -&gt; UICollectionViewCell
    {
        let cell : NNAmenitiesOrFurnishingCollectionViewCell = self.amenitiesOrFurnishingCollectionView.dequeueReusableCell(withReuseIdentifier: "NNAmenitiesOrFurnishingCollectionViewCell", for: indexPath) as! NNAmenitiesOrFurnishingCollectionViewCell
        cell.facilityImageName = self.facilityArray[(indexPath as NSIndexPath).row].imageName
        cell.facilityLabelString = self.facilityArray[(indexPath as NSIndexPath).row].labelText
        return cell
    }
</code></pre>

<p>Can anyone tell me why <code>indexPath</code> is type casted to <code>NSIndexPath</code>.</p>