2012-07-06 9 views

답변

2

수동으로 예를 들어, 점 및 줄 바꿈을 추가하십시오 UIWebView를 들어

NSArray *items = [NSArray arrayWithObjects:@"Stack",@"Overflow",nil]; 
NSMutableString *formattedString = [[NSMutableString alloc] init ]; 
for (NSString *item in items) [formattedString appendFormat:@"\u2022 %@\n", item]; 
theTextViewName.text = formattedString; 

가 정렬되지 않은 HTML 목록을 작성, 예를 들면 :

NSArray *items = [NSArray arrayWithObjects:@"Stack",@"Overflow",nil]; 
NSMutableString *theSource = [[NSMutableString alloc] init ]; 
[theSource appendFormat:@"<ul>"]; 
for (NSString *item in items) [theSource appendFormat:@"<li>%@</li>", item]; 
[theSource appendFormat:@"</ul>"]; 
[theWebView loadHTMLString:theSource baseURL:nil]; 

모두 결과에를 다음 목록 :

  • 스택
  • 오버플로
관련 문제