Skip to content

Instantly share code, notes, and snippets.

@sneakyness
Created September 22, 2012 22:38
Show Gist options
  • Save sneakyness/3768099 to your computer and use it in GitHub Desktop.
Save sneakyness/3768099 to your computer and use it in GitHub Desktop.
Am I pathtarded? I think I am.
NSString *resourcePath = [bundleFiles objectAtIndex:indexPath.row];
NSString *resourceType = [resourcePath pathExtension];
NSString *resource = [resourcePath stringByReplacingOccurrencesOfString:[NSString stringWithFormat:@".%@",resourceType] withString:@""];
NSString *path = [[NSBundle mainBundle] pathForResource:resource ofType:resourceType];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment