1

I want to get a NSString out of the table HeaderView that's on top that moment. Because I want to implent it in ScrollViewDidScroll so one label changes when the header view changes.

Didn't find any clues on the web how to do this

Thanks!

4

1 に答える 1

1

There is no predefined method by which you can get top section. There is one trick by which you can achieve it. First get indexPath for all visible cells.

NSArray *visible = [tableView indexPathsForVisibleRows];

NSIndexPath *indexpath = (NSIndexPath*)[visible objectAtIndex:0];

Now you can get section value by indexpath.section. After getting this section you can get string from your data array for this section.

于 2013-02-25T17:25:50.843 に答える