Created
August 14, 2015 11:02
-
-
Save odrobnik/df580d010e808c483ce7 to your computer and use it in GitHub Desktop.
Fetched Results in Swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func numberOfSectionsInTableView(tableView: UITableView) -> Int | |
{ | |
if let sections = fetchedResultsController.sections | |
{ | |
return sections.count | |
} | |
return 0 | |
} | |
override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int | |
{ | |
if let sections = fetchedResultsController.sections | |
{ | |
if let section = sections[section] as? NSFetchedResultsSectionInfo | |
{ | |
return section.numberOfObjects | |
} | |
} | |
return 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment