Return to Snippet

Revision: 46351
at May 17, 2011 21:35 by zamza726


Initial Code
- (NSString *) loadFilePath:(NSString *)fileName {
	
	NSArray * rslt = [fileName componentsSeparatedByString:@"."];
	if ([rslt count]!=2) {
		return;
	}
	NSString * fileTitle = [rslt objectAtIndex:0];
	NSString * fileType = [rslt objectAtIndex:1];
	
	NSString *filepath = [[NSBundle mainBundle] pathForResource:fileTitle ofType:fileType];
	
	return filepath;
}

Initial URL

                                

Initial Description

                                

Initial Title
divide filename and extention

Initial Tags

                                

Initial Language
Objective C