Last active
December 26, 2015 09:29
-
-
Save jcromartie/7130038 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSIndexPath *)nextIndexPath:(NSIndexPath *)i | |
{ | |
// apologies to any maintainer but this was some code golf going on in #iphonedev | |
id t=_tableView; | |
int s,r,n;s=i.section;r=(i.row+1)%[t numberOfRowsInSection:s];n=[t numberOfSections]; | |
if(!r)for(;s<n&&![t numberOfRowsInSection:s+++1];); | |
return s==n?nil:[NSIndexPath indexPathForRow:r inSection:s]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment