how use text file through code iphone
nsstring *filepath = [[[nsbundle mainbundle] resourcepath] stringbyappendingpathcomponent:yourfilename];
or
nsstring *filepath = [[nsbundle mainbundle] pathforresource:yourfilename oftype:@"text"]; nsstring *mytext = [nsstring stringwithcontentsoffile:filepath encoding:nsutf8stringencoding error:nil];
hope helps
Comments
Post a Comment