I am having troubles trying to load the data from all the rows of a tableview. I did this loop to access the rows:
for (NSInteger i = 0; i < [tblPeticiones numberOfRowsInSection:0]; i++)
And it works well. The problem appears when i try to get the subviews of each row. I use this code:
NSArray *n=[[tblPeticiones cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]] subviews];
And it also works. My problem is that it only works with the visible cells.
How should i do to load all the rows?
You are trying to (ab-)use the table view cells as data source, which is not a good idea.
Store the data in an array (e.g. an array of dictionaries containing all information for each row) and use this array as data source for the table view.
Then you can access all data independent of the view.