标签:
NSString *photosDirectory = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"Photos"];
NSArray * photosArray = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:photosDirectory error:nil];
如果Photos里有文件1.png,2.png,3.png . photosArray数组将会是 @[@"1.png", @"2.png", @"3.png"]
NSString *photoName = photosArray[0];
NSString *photoFilePath = [photosDirectory stringByAppendingPathComponent:photoName];
NSString *photoNameWithoutSuffix= [photoName stringByDeletingPathExtension];
标签:
原文地址:http://www.cnblogs.com/oumygade/p/4570202.html