Returns an integer identifying the section in which a model object belongs.
- iOS 3.0+
- Mac Catalyst 13.0+
- tvOS 10.2+
A model object of the application that is part of the data model for the table view.
The selector of a method of
objectthat returns the string to use for sorting. The method represented by the selection must take no arguments and return an
NSStringobject. For example, you might specify the selector for a
nameproperty of the object.
An integer that identifies the section in which the model object belongs. The numbers returned indicate a sequential ordering.
The table-view controller should iterate through all model objects for the table view and call this method for each object. If the application provides a
Localizable file for the current language preference, the indexed-collation object localizes each string returned by the method identified by
selector. It uses this localized name when collating titles. The controller should use the returned integer to identify a local “section” array in which it should insert