【发布时间】:2010-07-28 23:18:22
【问题描述】:
我是 iPhone 编程新手.. 我有一个 html 文件..in 有 3 行文本。 我想在消息部分的 alertview 中显示该文本。 为此,我们需要读取 html 并将数据存储在字符串中.. 使用该字符串作为消息... 我对吗..? 然后硬件读取 html 以及如何将其存储在字符串中..?
请帮帮我
谢谢你 ......
NSString *path = [[NSBundle mainBundle] pathForResource:chapter.page ofType:@"html"]; NSString *content = [NSString stringWithContentsOfFile: 路径编码:NSASCIIStringEncoding 错误:NULL];
UIAlertView *tAlert = [[UIAlertView alloc] initWithTitle:nil message:content delegate:self
cancelButtonTitle:nil otherButtonTitles:@"CLICK HERE", @"OR CONTINUE", @"OR BACK",nil];
tAlert.tag=TOSChapter;
[tAlert show];
[tAlert release];
在它显示html的所有标签...而不是解析html有没有其他方法可以在alertview中显示html的内容..?
谢谢你...
【问题讨论】:
标签: iphone html uialertview