1) My problem: how to call NumberofRowsInSection of UItableViewDataSource Method of another UItableViewdataSource.
2 ) HOw to make aggrateTableViewDataSource from n number of Different CustomTableViewDataSource?
Need Help.
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think there is some conceptional confusion in your question.
datasourceis a delegate protocol. That means that you can have a class that adopts that protocol. That again means that it has certain required or optional methods, e.g.tableView:numberOfRowsInSection:in the case of the protocolUITableViewDataSource.Therefore there is no such thing as “two datasources”. If your class that implements the datasource protocol has more than one source for its data, that’s a different kind of “data source” – and a question completely unrelated to the
datasourceprotocol for table views.Of course, you can have more than one
UITableViewthat refers to the same class as itsdatasource. This is actually common for search tables which typically can display both the original and the search result table. In this case, you check in your datasource methods which table view is requesting the data.