• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
titleForHeaderInSection wrong section count.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

titleForHeaderInSection wrong section count.


  • Subject: titleForHeaderInSection wrong section count.
  • From: James Cicenia <email@hidden>
  • Date: Mon, 19 Oct 2015 13:26:55 -0500

I have a fetch

let aFetchedResultsController = NSFetchedResultsController(fetchRequest: fetchRequest, managedObjectContext: getManagedObjectContext(), sectionNameKeyPath:"product.sectionKey", cacheName:nil)

In the following function:

 func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
	print(section)
        print (searchFetchedResultsController.sectionIndexTitles)

I see:

30
["1", "2", "4", "8", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"]

Yes there are 30 elements but the array is zero based.

What is happening here?

Thanks
James



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: titleForHeaderInSection wrong section count.
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Swift: Trying to use ViewController(). to access object
  • Next by Date: Re: App keeps being told to open nonexistent doc on launch
  • Previous by thread: Re: Swift: Trying to use ViewController(). to access object
  • Next by thread: Re: titleForHeaderInSection wrong section count.
  • Index(es):
    • Date
    • Thread