NSMutableArray *cells = [[NSMutableArray alloc] init]; for (NSInteger j = 0; j < [tableView numberOfSections]; ++j) { for (NSInteger i = 0; i < [tableView numberOfRowsInSection:j]; ++i) { [cells addObject:[tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:i inSection:j]]]; } }
![【objective-c】UITableViewにあるセル全てをループして取得する方法 - もぐめぽろぐ](https://cdn-ak-scissors.b.st-hatena.com/image/square/5ef2abf297654160d497a505d7d3e1ff16daaaeb/height=288;version=1;width=512/https%3A%2F%2Fblog.mogmet.com%2Fwp-content%2Fuploads%2F2014%2F01%2Ftablecell.png)