Changing the Style of the Table View
So far, the Table View has been showing rows in plain format (i.e., rows of data separated by horizontal lines). Besides this style, the Table View also allows you to display sections of rows in groups, visually.
In Interface Builder, edit the RootViewController.xib file, select the Table View, and open the Attributes Inspector window. In the Style property (see Figure 7), select Grouped. Save the file.
When you press Command-R to test the application again, you will notice that all the rows are displayed in groups (see Figure 8).

Figure 6. Searching the Table View: The Table View will display all the rows matching your search string. |
|

Figure 7. Modifying the Style of the Table View: In the Style property, select Grouped. |
|

Figure 8. Displaying the Rows in a Table View in Visual Groups: When you test the application, you will notice that all the rows are displayed in groups. |
What Have You Learned?
In this article, you have seen how to group rows of data in a Table View into sections and then add an index to the right side of the screen so that users can directly jump to a particular section in the table. In addition, you also learned how to implement search functionality in a Table View, a feature that is very useful for large number of rows. Hopefully, you have found this Table View series useful.