What is data source in iPhone?

The datasource is an object that implements the required datasource protocol that is needed to create a complex control.

Ex UITableView is a view that needs a datasource object to which will help building the table. Often it's the controller that is displaying the table view. The protocol that dataSource object ( mostly controller it self) has to implement is “UITableViewDataSource” .

To understand it follow step by step by Process

Step1

When we doesn't connect table view datasource to File owner it show output in iPhone.

delegate-datsourc-in-iPhone.png

Output in iPhone

output1-in-iPhone.png

Here it doesn't show data which is passing using array.

Step2

When we connect table view datasource to File owner it show output in iPhone.

Output in iPhone

output2-in-iPhone.png

Here it show data which is passing using array.

Ebook Download
View all
Learn
View all