iOS开发中加载.txt文件**
NSBundle *mainBundle = [NSBundle mainBundle];
// 获取txt文件路径
NSString *txtPath = [mainBundle pathForResource:@"service" ofType:@"txt"];
// 将txt到string对象中,编码类型为NSUTF8StringEncoding
NSString *string = [[NSString alloc] initWithContentsOfFile:txtPath encoding:NSUTF8StringEncoding error:nil];
得到的字符串数据,把字符串数据显示到UI控件上,内容少的用UILable控件,内容多的话一般用UITextView控件