讀取數據時使用的字符串 NSString *Content = @"mytestline one \n My second line";
MyTextView1.text = Content;
TextView的打印出2行正確時包括關於目標c換行符。如何從資源字符串
當從資源讀取相同的字符串 NSString *Content = ReadMyStringClass
MyTextView1.text = Content;
的TextView只打印出與轉義字符內容的一個單行「\ n」收錄。 如何在Textview上創建換行符?
ReadMyStringClass
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:@"XmlDictionary.plist"];
NSDictionary *XmlDictionary = [NSDictionary dictionaryWithContentsOfFile: finalPath];
NSString *WelcomeText = [XmlDictionary objectForKey:@"WelcomeMessage"];
什麼是「ReadMyStringClass」 – 2012-03-26 16:04:23
我已更新有關您的問題的問題。 – Nasenbaer 2012-03-26 16:30:26