Get current indexPath row with multiple sections?
first you do not need the first if because it would not run through the for-next. Then you are adding one which is not necessary and then you can just add the indexPath.row like that:
NSInteger sumSections = 0;
for (int i = 0; i < indexPath.section; i++) {
int rowsInSection = [activitiesTable numberOfRowsInSection:i];
sumSections += rowsInSection;
}
currentRow = sumSections + indexPath.row;