Search code examples
iosswiftxcode6nsindexpath

IndexPath for row 0


I'd like to get the NSIndexPath for the row 0. How can I find out the correct NSIndexPath for the row 0? I'd like to set it in here: let object = self.fetchedResultsController.objectAtIndexPath(/*the indexPath for row 0*/) as NSManagedObject Do you know how I can do this and would like to help me? Thanks for your answers.


Solution

  • NSIndexPath(forRow: 0, inSection: 0)
    

    is what you are looking for.