You may have sections of strings . There is always at least one section to view the table. You can use the numberOfSections method to change this. Similarly, tableView:numberOfRowsInSection: indicates how many rows are in this section. And finally, tableView:cellForRowAtIndexPath: gives the cell the specified row and section. For example, in the contacts application, each alphabet is a section. Its lines are all names starting with this letter. For example, "S" will have "Samuel," "Sarah." Similarly, “A” will have “Ali,” “Alex.” I suggest you read this carefully.
source share